(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8450],{2113:(e,t,a)=>{"use strict";a.d(t,{O:()=>n,u:()=>o});var r=a(45704),s=a(66724);let i=(0,s.createContext)(void 0),l="cookie_consent_status",n=e=>{let{children:t}=e,[a,n]=(0,s.useState)("pending");(0,s.useEffect)(()=>{let e=function(e){let t=e+"=",a=document.cookie.split(";");for(let e=0;e{!function(e,t,a){let r="";{let e=new Date;e.setTime(e.getTime()+31536e6),r="; expires="+e.toUTCString()}document.cookie=e+"="+(t||"")+r+"; path=/; SameSite=Lax; Secure"}(l,e,365),n(e)},[]),d=(0,s.useCallback)(()=>{o("1")},[o]),c=(0,s.useCallback)(()=>{o("0")},[o]);return(0,r.jsx)(i.Provider,{value:{consentStatus:a,acceptConsent:d,rejectConsent:c},children:t})},o=()=>{let e=(0,s.useContext)(i);if(void 0===e)throw Error("useCookieConsent must be used within a CookieConsentProvider");return e}},5552:(e,t,a)=>{"use strict";a.d(t,{ContactSupportProvider:()=>l,d:()=>n});var r=a(45704),s=a(66724);let i=(0,s.createContext)(void 0);function l(e){let{children:t}=e,[a,l]=(0,s.useState)(!1);return(0,r.jsx)(i.Provider,{value:{isContactSupportOpen:a,setIsContactSupportOpen:l},children:t})}function n(){let e=(0,s.useContext)(i);if(void 0===e)throw Error("useContactSupport must be used within a ContactSupportProvider");return e}},7662:(e,t,a)=>{"use strict";a.d(t,{$:()=>l,H:()=>n});var r=a(45704),s=a(66724);let i=(0,s.createContext)(void 0);function l(e){let{children:t}=e,[a,l]=(0,s.useState)(!1);return(0,r.jsx)(i.Provider,{value:{isMobileMenuOpen:a,setIsMobileMenuOpen:l},children:t})}function n(){let e=(0,s.useContext)(i);if(void 0===e)throw Error("useMobileMenu must be used within a MobileMenuProvider");return e}},8814:(e,t,a)=>{"use strict";function r(e,t){let a={};for(let[r,i]of Object.entries(e))s(i,t[r])||(a[r]="");return a}function s(e,t){if(void 0===t)return!0;let a=!0;for(let r of t.split("|"))if(!function(e,t){var a;let r=t.split(":")[0],s=null!==(a=t.split(":")[1])&&void 0!==a?a:null;switch(r){case"array":return Array.isArray(e);case"required":if(null==e||""===e)return!1;if(Array.isArray(e))return e.length>0;return!0;case"email":let i=e&&!e.includes("@gnail")&&!e.includes("@gmai.");return e&&/^[\w.!?#$%&'=~|{}`+*^][\w\-.!?#$%&'=~|{}`+*^]*@((xn--)?[\w]+([-][\w]+)*\.)+[a-z]{2,}$/i.test(e)&&i;case"date":return!isNaN(new Date(e).getTime());case"string":return"string"==typeof e;case"phone":return/^(0[35789]\d{8}|84[35789]\d{8}|1900\d{6}|02[48]\d{7,8})$/g.test(e);case"in":let l=s?s.split(","):[];if(Array.isArray(e))return e.every(e=>l.includes(e.toString()));return e&&l.includes(e.toString());case"integer":if(null==e||""===String(e).trim())return!1;return!isNaN(parseFloat(String(e)))&&Number.isInteger(Number(e));case"min":return e.length>=parseInt(s||"0");case"max":return e.length<=parseInt(s||"0");default:return!0}}(e,r)){a=!1;break}return a}a.d(t,{j:()=>s,l:()=>r})},14475:(e,t,a)=>{"use strict";a.d(t,{default:()=>h});var r=a(45704),s=a(66724),i=a(51265),l=a(58192),n=a(31133),o=a(57969),d=a(11878),c=a(64704),m=a(5507),u=a(24293);function h(){let e=(0,c.n)(e=>e.isResetPasswordOpen),t=(0,u.a8)(),a=null==t?void 0:t.endsWith("/patient/checkout"),h=(0,c.n)(e=>e.closeAll),p=(0,c.n)(e=>e.openLogin),x=(0,c.n)(e=>e.openOTP),g=(0,c.n)(e=>e.setPreviousPopup),[f,b]=(0,s.useState)(""),[v,y]=(0,s.useState)(""),[j,w]=(0,s.useState)(!1),[N,k]=(0,s.useState)(!1),[_,C]=(0,s.useState)(""),[S,A]=(0,s.useState)(""),[z,P]=(0,s.useState)(!1),[E,M]=(0,s.useState)(""),L=(0,s.useRef)(null);(0,s.useEffect)(()=>{let t=t=>{e&&L.current&&!L.current.contains(t.target)&&!a&&(h(),b(""),y(""),w(!1),k(!1),C(""),A(""),M(""))};return e&&document.addEventListener("mousedown",t),()=>{document.removeEventListener("mousedown",t)}},[e,h,a]);let F=()=>{h(),b(""),y(""),w(!1),k(!1),C(""),A(""),M("")},I=()=>{{let e=localStorage.getItem("forgot_password_phone");if(e)return e}return null},T=e=>{if(!e){C(""),v&&H(v,e);return}if(e.length<8||e.length>20){C("Mật khẩu phải c\xf3 từ 8-20 k\xfd tự");return}let t=/\d/.test(e),a=/[A-Z]/.test(e),r=/[a-z]/.test(e),s=/[@#$%&*!?]/.test(e);if(!t){C("Mật khẩu phải c\xf3 \xedt nhất 1 k\xfd tự số");return}if(!a){C("Mật khẩu phải c\xf3 \xedt nhất 1 chữ hoa");return}if(!r){C("Mật khẩu phải c\xf3 \xedt nhất 1 chữ thường");return}if(!s){C("Mật khẩu phải c\xf3 \xedt nhất 1 k\xfd tự đặc biệt (@, #, $, %, &, *, !, ?)");return}C(""),v&&H(v,e)},H=(e,t)=>{let a=t||f;e&&e!==a?A("Mật khẩu nhập lại kh\xf4ng khớp"):A("")},O=async()=>{if(M(""),T(f),H(v),!_&&!S&&f&&v&&f===v){let s=I();if(!s){M("Kh\xf4ng t\xecm thấy số điện thoại");return}P(!0);try{await m.uE.post("/otps/send",{phone:s,type:"phone",dev:!0}),localStorage.setItem("reset_password_data",JSON.stringify({newPassword:f,confirmPassword:v})),h(),g("forgot-password"),x("forgot-password")}catch(s){var e,t,a,r;M((null===(t=s.response)||void 0===t?void 0:null===(e=t.data)||void 0===e?void 0:e.message)||(null===(r=s.response)||void 0===r?void 0:null===(a=r.data)||void 0===a?void 0:a.error)||"Kh\xf4ng thể gửi m\xe3 OTP. Vui l\xf2ng thử lại.")}finally{P(!1)}}};return(0,r.jsx)(r.Fragment,{children:e&&(0,r.jsxs)("div",{className:"fixed inset-0 flex items-center justify-center z-[100]",children:[(0,r.jsx)("div",{className:"absolute bg-black opacity-70 inset-0 cursor-pointer",onClick:a?void 0:F}),(0,r.jsx)("div",{className:"relative z-10 max-h-[100svh] p-4 w-full overflow-y-auto",children:(0,r.jsx)("div",{className:"flex items-center justify-center",children:(0,r.jsxs)("div",{ref:L,className:"bg-white rounded-lg md:pt-12 md:pb-8 md:px-6 pt-12 pb-4 px-4 max-w-md w-full relative",children:[(0,r.jsxs)("button",{className:"absolute text-primary-600 xl:top-4 md:top-3 top-2 xl:left-4 md:left-3 left-2 text-gray-500 hover:text-gray-700 cursor-pointer flex items-center gap-1",onClick:()=>{h(),p()},children:[(0,r.jsx)(i.A,{className:"md:size-5 size-4"}),(0,r.jsx)("span",{className:"body-2",children:"Quay lại"})]}),!a&&(0,r.jsx)("button",{className:"absolute xl:top-4 md:top-3 top-2 xl:right-4 md:right-3 right-2 text-gray-500 hover:text-gray-700 cursor-pointer",onClick:F,children:(0,r.jsx)(l.A,{size:20})}),(0,r.jsx)("div",{className:"flex items-center justify-center mb-2",children:(0,r.jsx)(d.p,{src:"/images/logo.webp",alt:"UMC Care logo",width:242,height:45,priority:!0})}),(0,r.jsx)("p",{className:"text-center body-3 text-gray-600 xl:mb-6 md:mb-5 mb-4",children:"Vui l\xf2ng nhập mật khẩu mới"}),E&&(0,r.jsx)("div",{className:"bg-red-50 border border-red-200 rounded-md p-3 mb-4",children:(0,r.jsx)("p",{className:"text-red-600 body-3",children:E})}),(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)("label",{htmlFor:"newPassword",className:"block body-2 !font-medium text-gray-700 mb-1",children:"Mật khẩu mới"}),(0,r.jsx)("input",{id:"newPassword",type:j?"text":"password",value:f,onChange:e=>{let t=e.target.value;b(t),T(t)},className:"w-full px-3 py-2 border ".concat(_?"border-red-500":"border-gray-300"," rounded-md focus:outline-none focus:ring-0 body-3 pr-10"),placeholder:"Nhập mật khẩu mới"}),(0,r.jsx)("button",{type:"button",className:"absolute right-3 top-9 text-gray-500",onClick:()=>w(!j),children:j?(0,r.jsx)(n.A,{size:20}):(0,r.jsx)(o.A,{size:20})}),_&&(0,r.jsx)("p",{className:"text-red-500 body-4 mt-1",children:_})]}),(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)("label",{htmlFor:"confirmPassword",className:"block body-2 !font-medium text-gray-700 mb-1",children:"Nhập lại mật khẩu mới"}),(0,r.jsx)("input",{id:"confirmPassword",type:N?"text":"password",value:v,onChange:e=>{let t=e.target.value;y(t),H(t)},className:"w-full px-3 py-2 border ".concat(S?"border-red-500":"border-gray-300"," rounded-md focus:outline-none focus:ring-0 body-3 pr-10"),placeholder:"Nhập lại mật khẩu mới"}),(0,r.jsx)("button",{type:"button",className:"absolute right-3 top-9 text-gray-500",onClick:()=>k(!N),children:N?(0,r.jsx)(n.A,{size:20}):(0,r.jsx)(o.A,{size:20})}),S&&(0,r.jsx)("p",{className:"text-red-500 body-4 mt-1",children:S})]}),(0,r.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,r.jsx)("button",{className:"w-full btn btn-light label-2 max-md:!px-4 disabled:opacity-50 disabled:cursor-not-allowed",onClick:O,disabled:z,children:z?"Đang gửi m\xe3 OTP...":"X\xe1c nhận"}),(0,r.jsx)("button",{className:"w-full btn btn-outline-primary label-2 max-md:!px-4",onClick:()=>{F(),p()},children:"Đăng nhập"})]})]})]})})})]})})}},14934:(e,t,a)=>{"use strict";a.d(t,{default:()=>h});var r=a(45704),s=a(66724),i=a(51265),l=a(58192),n=a(31133),o=a(57969),d=a(11878),c=a(64704),m=a(5507),u=a(24293);function h(){let e=(0,c.n)(e=>e.isSignupOpen),t=(0,u.a8)(),a=null==t?void 0:t.endsWith("/patient/checkout"),h=(0,c.n)(e=>e.closeAll),p=(0,c.n)(e=>e.openLogin),x=(0,c.n)(e=>e.openOTP),g=(0,c.n)(e=>e.setPreviousPopup),[f,b]=(0,s.useState)(""),[v,y]=(0,s.useState)(""),[j,w]=(0,s.useState)(""),[N,k]=(0,s.useState)(""),[_,C]=(0,s.useState)(!1),[S,A]=(0,s.useState)(!1),[z,P]=(0,s.useState)(""),[E,M]=(0,s.useState)(""),[L,F]=(0,s.useState)(""),[I,T]=(0,s.useState)(""),[H,O]=(0,s.useState)(!1),[q,W]=(0,s.useState)(""),R=(0,s.useRef)(null);(0,s.useEffect)(()=>{let t=t=>{e&&R.current&&!R.current.contains(t.target)&&!a&&(h(),b(""),y(""),w(""),k(""),A(!1),P(""),M(""),F(""),T(""),W(""))};return e&&document.addEventListener("mousedown",t),()=>{document.removeEventListener("mousedown",t)}},[e,h,a]);let D=()=>{h(),b(""),y(""),w(""),k(""),A(!1),P(""),M(""),F(""),T(""),W("")},V=e=>{e?/^(0|\+84)\d{9,10}$/.test(e)?P(""):P("Số điện thoại kh\xf4ng hợp lệ"):P("")},U=e=>{e?/^\S+@\S+\.\S+$/.test(e)?M(""):M("Email kh\xf4ng hợp lệ"):M("")},B=e=>{e&&e.trim().length<2?F("Họ v\xe0 t\xean phải c\xf3 \xedt nhất 2 k\xfd tự"):F("")},$=e=>{if(!e){T("");return}if(e.length<8||e.length>20){T("Mật khẩu phải c\xf3 từ 8-20 k\xfd tự");return}let t=/\d/.test(e),a=/[A-Z]/.test(e),r=/[a-z]/.test(e),s=/[@#$%&*!?]/.test(e);if(!t){T("Mật khẩu phải c\xf3 \xedt nhất 1 k\xfd tự số");return}if(!a){T("Mật khẩu phải c\xf3 \xedt nhất 1 chữ hoa");return}if(!r){T("Mật khẩu phải c\xf3 \xedt nhất 1 chữ thường");return}if(!s){T("Mật khẩu phải c\xf3 \xedt nhất 1 k\xfd tự đặc biệt (@, #, $, %, &, *, !, ?)");return}T("")},Y=async()=>{var e,t,a,r,s,i,l,n;if(W(""),!j){P("Vui l\xf2ng nhập số điện thoại");return}if(!v){M("Vui l\xf2ng nhập email");return}if(!f){F("Vui l\xf2ng nhập họ v\xe0 t\xean");return}if(!N){T("Vui l\xf2ng nhập mật khẩu");return}if(!S){W("Vui l\xf2ng đồng \xfd với điều khoản sử dụng");return}if(!z&&!E&&!L&&!I){O(!0);try{let{data:a}=await m.uE.post("/auth/user/check",{identifier:j});if(null===(e=a.data)||void 0===e?void 0:e.exists){W("Số điện thoại n\xe0y đ\xe3 được đăng k\xfd. Vui l\xf2ng đăng nhập."),O(!1);return}let r=await m.uE.post("/otps/send",{phone:j,type:"phone",dev:!0});localStorage.setItem("signup_data",JSON.stringify({name:f,email:v,phone:j,password:N,key:(null===(t=r.data)||void 0===t?void 0:t.key)||null})),h(),g("signup"),x("signup")}catch(e){W((null===(r=e.response)||void 0===r?void 0:null===(a=r.data)||void 0===a?void 0:a.message)||(null===(i=e.response)||void 0===i?void 0:null===(s=i.data)||void 0===s?void 0:s.error)||"Đ\xe3 xảy ra lỗi. Vui l\xf2ng thử lại."),(null===(n=e.response)||void 0===n?void 0:null===(l=n.data)||void 0===l?void 0:l.errors)&&(e.response.data.errors.phone&&P(e.response.data.errors.phone[0]),e.response.data.errors.email&&M(e.response.data.errors.email[0]),e.response.data.errors.name&&F(e.response.data.errors.name[0]))}finally{O(!1)}}};return(0,r.jsx)(r.Fragment,{children:e&&(0,r.jsxs)("div",{className:"fixed inset-0 flex items-center justify-center z-[100]",children:[(0,r.jsx)("div",{className:"absolute bg-black opacity-70 inset-0 cursor-pointer",onClick:a?void 0:D}),(0,r.jsx)("div",{className:"relative z-10 max-h-[100svh] p-4 w-full overflow-y-auto",children:(0,r.jsx)("div",{className:"flex items-center justify-center",children:(0,r.jsxs)("div",{ref:R,className:"bg-white rounded-lg md:pt-12 md:pb-8 md:px-6 pt-12 pb-4 px-4 max-w-md w-full relative",children:[(0,r.jsxs)("button",{className:"absolute text-primary-600 xl:top-4 md:top-3 top-2 xl:left-4 md:left-3 left-2 text-gray-500 hover:text-gray-700 cursor-pointer flex items-center gap-1",onClick:()=>{h(),p()},children:[(0,r.jsx)(i.A,{className:"md:size-5 size-4"}),(0,r.jsx)("span",{className:"body-2",children:"Quay lại"})]}),!a&&(0,r.jsx)("button",{className:"absolute xl:top-4 md:top-3 top-2 xl:right-4 md:right-3 right-2 text-gray-500 hover:text-gray-700 cursor-pointer",onClick:D,children:(0,r.jsx)(l.A,{size:20})}),(0,r.jsx)("div",{className:"flex items-center justify-center mb-2",children:(0,r.jsx)(d.p,{src:"/images/logo.webp",alt:"UMC Care logo",width:242,height:45,priority:!0})}),(0,r.jsx)("p",{className:"text-center body-3 text-gray-600 xl:mb-6 md:mb-5 mb-4",children:"Vui l\xf2ng đăng k\xfd để sử dụng"}),q&&(0,r.jsx)("div",{className:"bg-red-50 border border-red-200 rounded-md p-3 mb-4",children:(0,r.jsx)("p",{className:"text-red-600 body-3",children:q})}),(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{htmlFor:"fullName",className:"block body-2 !font-medium text-gray-700 mb-1",children:"Họ v\xe0 t\xean"}),(0,r.jsx)("input",{id:"fullName",type:"text",value:f,onChange:e=>{let t=e.target.value;b(t),B(t)},className:"w-full px-3 py-2 border ".concat(L?"border-red-500":"border-gray-300"," rounded-md focus:outline-none focus:ring-0 body-3"),placeholder:"Nhập họ v\xe0 t\xean"}),L&&(0,r.jsx)("p",{className:"text-red-500 body-4 mt-1",children:L})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{htmlFor:"email",className:"block body-2 !font-medium text-gray-700 mb-1",children:"Email"}),(0,r.jsx)("input",{id:"email",type:"email",value:v,onChange:e=>{let t=e.target.value;y(t),U(t)},className:"w-full px-3 py-2 border ".concat(E?"border-red-500":"border-gray-300"," rounded-md focus:outline-none focus:ring-0 body-3"),placeholder:"Nhập email"}),E&&(0,r.jsx)("p",{className:"text-red-500 body-4 mt-1",children:E})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{htmlFor:"phone",className:"block body-2 !font-medium text-gray-700 mb-1",children:"Số điện thoại"}),(0,r.jsx)("input",{id:"phone",type:"tel",value:j,onChange:e=>{let t=e.target.value.replace(/\D/g,"");w(t),V(t)},className:"w-full px-3 py-2 border ".concat(z?"border-red-500":"border-gray-300"," rounded-md focus:outline-none focus:ring-0 body-3"),placeholder:"Nhập số điện thoại"}),z&&(0,r.jsx)("p",{className:"text-red-500 body-4 mt-1",children:z})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{htmlFor:"password",className:"block body-2 !font-medium text-gray-700 mb-1",children:"Mật khẩu"}),(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)("input",{id:"password",type:_?"text":"password",value:N,onChange:e=>{let t=e.target.value;k(t),$(t)},className:"w-full px-3 py-2 pr-10 border ".concat(I?"border-red-500":"border-gray-300"," rounded-md focus:outline-none focus:ring-0 body-3"),placeholder:"Nhập mật khẩu"}),(0,r.jsx)("button",{type:"button",onClick:()=>C(!_),className:"absolute right-3 top-1/2 transform -translate-y-1/2 text-gray-500 hover:text-gray-700",children:_?(0,r.jsx)(n.A,{className:"w-4 h-4"}):(0,r.jsx)(o.A,{className:"w-4 h-4"})})]}),I&&(0,r.jsx)("p",{className:"text-red-500 body-4 mt-1",children:I})]}),(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)("input",{id:"agreeTerms",type:"checkbox",checked:S,onChange:e=>A(e.target.checked),className:"h-4 w-4 text-primary-500 focus:ring-primary-500 border-gray-300 rounded cursor-pointer flex-shrink-0"}),(0,r.jsx)("label",{htmlFor:"agreeTerms",className:"ml-2 body-2 text-gray-700",children:"Bằng việc đăng k\xfd t\xe0i khoản, t\xf4i đ\xe3 đọc v\xe0 đồng \xfd với c\xe1c điều khoản sử dụng"})]}),(0,r.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,r.jsx)("button",{className:"w-full btn btn-light label-2 max-md:!px-4 disabled:opacity-50 disabled:cursor-not-allowed",onClick:Y,disabled:!S||H,children:H?"Đang xử l\xfd...":"Đăng k\xfd"}),(0,r.jsx)("button",{className:"w-full btn btn-outline-primary label-2 max-md:!px-4",onClick:()=>{h(),p()},children:"Đăng nhập"})]})]})]})})})]})})}},15643:(e,t,a)=>{"use strict";a.d(t,{default:()=>p});var r=a(45704),s=a(54173),i=a(24293),l=a(73812),n=a(86166),o=a(66724),d=a(64704),c=a(72572),m=a(2113),u=a(7662),h=a(80578);function p(){let e=(0,s.c3)(),t=[{label:e("header.tab.patient"),href:"/",homeType:"patient"},{label:e("header.tab.medical_expert"),href:"/medical",homeType:"medical"},{label:"UMCers",href:"/umcers",homeType:"umc"}],a=(0,i.a8)(),p=(0,i.rd)(),x=(0,d.n)(e=>e.openLogin),g=(0,d.n)(e=>e.isAuthenticated),{consentStatus:f}=(0,m.u)(),{setIsMobileMenuOpen:b}=(0,u.H)(),[v,y]=(0,o.useState)(!1);(0,o.useEffect)(()=>{y(!0)},[]);let j=(0,o.useMemo)(()=>{let e=v&&"1"===f?(0,c.Ri)("homeType"):null;return h.U7.some(e=>a===e||a.startsWith(e+"/"))?e||"patient":h.Ij.some(e=>a===e||a.startsWith(e+"/"))?"medical":h.c$.some(e=>a===e||a.startsWith(e+"/"))?"umc":h.wY.some(e=>a===e||a.startsWith(e+"/"))?"patient":e||"patient"},[a,f,v]),w=v&&new Date().getTime(){"1"===f&&(0,c.TV)("homeType",e)};return(0,r.jsx)("div",{className:"".concat(w?"bg-gray-600":"bg-primary-500"," text-white h-[45px] z-[51] relative"),children:(0,r.jsx)("div",{className:"md:container h-full",children:(0,r.jsxs)("div",{className:"flex items-center justify-between h-full",children:[(0,r.jsx)("div",{className:"xl:flex grid grid-cols-3 max-xl:w-full items-center md:gap-4 gap-2 h-full",children:t.map((e,t)=>(0,r.jsx)(i.N_,{href:e.href,"data-text":e.label,className:"h-full items-center max-xl:text-center flex justify-center hover:text-primary-100 transition-colors relative before:content-[''] before:absolute before:left-0 before:bottom-0 before:h-[3px] ".concat(w?"before:bg-gray-300":"before:bg-primary-200"," before:w-0 before:transition-all hover:before:w-full max-md:whitespace-pre-line flex-col after:content-[attr(data-text)] after:h-0 after:block after:invisible after:overflow-hidden after:font-semibold after:text-[14px] ").concat(j===e.homeType?"text-white before:w-full title-5 max-md:!text-[12px]":"".concat(w?"hover:text-gray-200":"hover:text-primary-100"," before:w-0 hover:before:w-full label-4 max-md:!text-[12px]")),onClick:t=>{t.preventDefault(),N(e.homeType),b(!1),p.push(e.href)},children:e.label},t))}),(0,r.jsx)("div",{className:"flex items-center max-xl:hidden",children:"medical"===j?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"flex items-center space-x-1.5",children:(0,r.jsx)(i.N_,{href:"/patient/specialty",className:"body-3 ".concat(w?"hover:text-gray-200":"hover:text-primary-100"," transition-colors"),children:e("header.pre_header.specialty")})}),(0,r.jsx)("span",{className:"text-white mx-4 font-display",children:"|"}),(0,r.jsx)(i.N_,{href:"/patient/doctor",className:"body-3 ".concat(w?"hover:text-gray-200":"hover:text-primary-100"," transition-colors"),children:e("header.pre_header.doctor")}),(0,r.jsx)("span",{className:"text-white mx-4 font-display",children:"|"}),(0,r.jsx)(i.N_,{href:"/medical/career",className:"body-3 ".concat(w?"hover:text-gray-200":"hover:text-primary-100"," transition-colors mr-[22px]"),children:e("header.pre_header.career")}),(0,r.jsx)(i.N_,{href:"/medical/search",className:"size-[45px] cursor-pointer ".concat(w?"bg-gray-500 lg:hover:bg-gray-700":"bg-primary-400 lg:hover:bg-primary-700"," flex items-center justify-center lg:duration-150"),children:(0,r.jsx)(l.A,{})})]}):"umc"===j?(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(i.N_,{href:{pathname:"/umcers",hash:"#contribution-section"},className:"body-3 ".concat(w?"hover:text-gray-200":"hover:text-primary-100"," transition-colors cursor-pointer"),children:e("header.pre_header.donate")})}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.N_,{href:"/patient/checkout",className:"body-3 ".concat(w?"hover:text-gray-200":"hover:text-primary-100"," transition-colors"),children:e("header.pre_header.booking")}),(0,r.jsx)("span",{className:"text-white mx-4 font-display",children:"|"}),(0,r.jsx)(i.N_,{href:"/patient/bidding",className:"body-3 ".concat(w?"hover:text-gray-200":"hover:text-primary-100"," transition-colors"),children:e("header.pre_header.bidding")}),(0,r.jsx)("span",{className:"text-white mx-4 font-display",children:"|"}),(0,r.jsx)(i.N_,{href:"/about/contact",className:"body-3 ".concat(w?"hover:text-gray-200":"hover:text-primary-100"," transition-colors mr-[22px]"),children:e("header.pre_header.contact")}),(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)("div",{className:"relative",children:v&&g?(0,r.jsx)(i.N_,{href:"/patient/account/user/user-info",className:"w-[42px] h-[45px] cursor-pointer flex items-center justify-center ".concat(w?"lg:hover:bg-gray-700":"lg:hover:bg-primary-700"," lg:duration-150"),children:(0,r.jsx)(n.A,{className:"size-[20px]"})}):(0,r.jsx)("button",{type:"button",className:"w-[42px] h-[45px] cursor-pointer flex items-center justify-center ".concat(w?"lg:hover:bg-gray-700":"lg:hover:bg-primary-700"," lg:duration-150"),onClick:e=>{e.stopPropagation(),x("/patient/account/user/user-info")},children:(0,r.jsx)(n.A,{className:"size-[20px]"})})}),(0,r.jsx)(i.N_,{href:"/patient/search",className:"size-[45px] cursor-pointer ".concat(w?"bg-gray-500 lg:hover:bg-gray-700":"bg-primary-400 lg:hover:bg-primary-700"," flex items-center justify-center lg:duration-150"),children:(0,r.jsx)(l.A,{})})]})]})})]})})})}},17273:(e,t,a)=>{"use strict";a.d(t,{default:()=>i});var r=a(45704),s=a(99018);function i(e){let{children:t}=e,a=(0,s.usePathname)();return(null==a?void 0:a.includes("/welcome"))||(null==a?void 0:a.includes("/chao-mung"))?null:(0,r.jsx)(r.Fragment,{children:t})}},25099:(e,t,a)=>{"use strict";a.d(t,{default:()=>b});var r=a(45704),s=a(5552),i=a(66724),l=a(58192),n=a(92922),o=a(72680),d=a(16902),c=a(5481),m=a(7283),u=a(85942),h=a(8814),p=a(11878),x=a(73071),g=a(54173);function f(e){let{isOpen:t,onClose:a}=e,s=(0,m.Ym)(),f=(0,g.c3)(),[b,v]=(0,i.useState)({name:"",email:"",phone:"",message:"",files:[]}),[y,j]=(0,i.useState)({}),[w,N]=(0,i.useState)(!1),[k,_]=(0,i.useState)(!1),[C,S]=(0,i.useState)(0),[A,z]=(0,i.useState)(""),P={name:"required",email:"required|email",phone:"required|phone",message:"required"},E={name:{required:f("validation.name_invalid")},email:{required:f("validation.required"),email:f("validation.email_invalid")},phone:{required:f("validation.required"),phone:f("validation.phone_invalid")},message:{required:f("validation.message_required")},files:{max:f("validation.file_too_large")}},M=(e,t)=>{let a=P[e];if(!a)return"";for(let s of a.split("|"))if(!(0,h.j)(t,s)){var r;let[t]=s.split(":");return null===(r=E[e])||void 0===r?void 0:r[t]}return""},L=e=>{let{name:t,value:a}=e.target,r="phone"===t?a.replace(/\D/g,""):a;v(e=>({...e,[t]:r}));let s=M(t,r);s?j(e=>({...e,[t]:s})):j(e=>{let{[t]:a,...r}=e;return r})},F=e=>{v(t=>({...t,files:t.files.filter((t,a)=>a!==e)}))},I=async e=>{e.preventDefault(),N(!0),j({}),_(!1);let t=(0,h.l)(b,P);if(Object.keys(t).length>0){let e={};Object.keys(t).forEach(t=>{e[t]=M(t,b[t])}),b.files.length>0&&b.files.filter(e=>e.size>0xa00000).length>0&&(e.files=E.files.max),j(e),N(!1);return}try{let e=await (0,u.hw)(),t=[];for(let a of b.files){z("vi"===s?"Tải tệp ".concat(a.name):"Uploading ".concat(a.name)),S(0);let r=await (0,u.ZP)(a,e=>{S(e.percentage)},s,e);t.push(r)}z("vi"===s?"Đang gửi biểu mẫu...":"Submitting form..."),S(0);let a=new FormData;a.append("files",JSON.stringify(t)),a.append("name",b.name),a.append("email",b.email),a.append("phone",b.phone),a.append("message",b.message),a.append("type","contacts"),await (0,u.RS)(a,s,void 0,e),_(!0),v({name:"",email:"",phone:"",message:"",files:[]})}catch(e){j({submit:f("validation.submit_error")})}finally{N(!1),z(""),S(0)}};return(0,r.jsx)(x.A,{isOpen:t,onClose:()=>{a(),_(!1)},wrapperClassName:k?"max-w-[400px] w-full":"max-w-4xl w-full",children:(0,r.jsxs)("div",{className:"bg-white rounded-lg shadow-xl",children:[(0,r.jsx)("button",{onClick:()=>{a(),_(!1)},className:"absolute top-4 right-4 cursor-pointer",children:(0,r.jsx)(l.A,{className:"w-6 h-6 text-gray-500 lg:hover:text-primary-600 lg:duration-150"})}),!k&&(0,r.jsx)("div",{className:"flex items-center justify-between p-4 border-b border-gray-200",children:(0,r.jsx)("h2",{className:"display-7 text-primary-600",children:f("support_contact.title")})}),(0,r.jsxs)("div",{className:"flex flex-1 overflow-hidden flex-col lg:flex-row",children:[(0,r.jsx)("div",{className:"flex-1 p-4",children:k?(0,r.jsxs)("div",{className:"flex flex-col items-center text-center pt-8",children:[(0,r.jsx)("div",{className:"xl:size-16 md:size-14 size-12 bg-green-100 rounded-full flex items-center justify-center xl:mb-3 mb-2",children:(0,r.jsx)("svg",{className:"xl:size-8 md:size-7 size-6 text-green-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M5 13l4 4L19 7"})})}),(0,r.jsx)("h3",{className:"heading-2 text-gray-900 md:mb-2 mb-1",children:f("support_contact.success.title")}),(0,r.jsx)("p",{className:"body-3 text-gray-600",children:f("support_contact.success.message")})]}):(0,r.jsxs)(r.Fragment,{children:[y.submit&&(0,r.jsx)("div",{className:"bg-red-50 border border-red-200 text-red-800 p-4 rounded-lg mb-4",children:(0,r.jsx)("p",{className:"body-3",children:y.submit})}),(0,r.jsxs)("form",{onSubmit:I,className:"space-y-4",children:[(0,r.jsxs)("div",{children:[(0,r.jsxs)("label",{htmlFor:"name",className:"block label-3 text-gray-800 mb-1.5",children:[f("support_contact.name")," ",(0,r.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,r.jsx)("input",{type:"text",id:"name",name:"name",value:b.name,onChange:L,className:"w-full px-3 py-2 body-3 border rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent ".concat(y.name?"border-red-500":"border-gray-300"),placeholder:f("support_contact.placeholder.name")}),y.name&&(0,r.jsx)("p",{className:"text-red-500 body-4 mt-1",children:y.name})]}),(0,r.jsxs)("div",{children:[(0,r.jsxs)("label",{htmlFor:"email",className:"block label-3 text-gray-800 mb-1.5",children:[f("support_contact.email")," ",(0,r.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,r.jsx)("input",{type:"email",id:"email",name:"email",value:b.email,onChange:L,className:"w-full px-3 py-2 body-3 border rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent ".concat(y.email?"border-red-500":"border-gray-300"),placeholder:f("support_contact.placeholder.email")}),y.email&&(0,r.jsx)("p",{className:"text-red-500 body-4 mt-1",children:y.email})]}),(0,r.jsxs)("div",{children:[(0,r.jsxs)("label",{htmlFor:"phone",className:"block label-3 text-gray-800 mb-1.5",children:[f("support_contact.phone")," ",(0,r.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,r.jsx)("input",{type:"tel",id:"phone",name:"phone",value:b.phone,onChange:L,className:"w-full px-3 py-2 body-3 border rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent ".concat(y.phone?"border-red-500":"border-gray-300"),placeholder:f("support_contact.placeholder.phone")}),y.phone&&(0,r.jsx)("p",{className:"text-red-500 body-4 mt-1",children:y.phone})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{htmlFor:"message",className:"block label-3 text-gray-800 mb-1.5",children:f("support_contact.message")}),(0,r.jsx)("textarea",{id:"message",name:"message",value:b.message,onChange:L,rows:4,className:"w-full px-3 py-2 body-3 border rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent resize-none ".concat(y.message?"border-red-500":"border-gray-300"),placeholder:f("support_contact.placeholder.message")}),y.message&&(0,r.jsx)("p",{className:"text-red-500 body-4",children:y.message})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{htmlFor:"files",className:"block label-3 text-gray-800 mb-1.5",children:f("support_contact.attach.title")}),(0,r.jsxs)("div",{className:"flex flex-wrap gap-4 mt-2",children:[b.files.map((e,t)=>{let a=e.type.startsWith("image/");return(0,r.jsxs)("div",{className:"relative group w-[100px] h-[100px]",children:[a?(0,r.jsx)(p.p,{src:URL.createObjectURL(e),alt:"Preview ".concat(t+1),fill:!0,className:"object-cover rounded-lg"}):(0,r.jsxs)("div",{className:"w-full h-full bg-gray-50 border border-gray-200 rounded-lg flex flex-col items-center justify-center p-2 text-center",children:[(0,r.jsx)(n.A,{className:"w-8 h-8 text-gray-400 mb-1"}),(0,r.jsx)("span",{className:"text-[10px] text-gray-500 line-clamp-2 break-all",children:e.name})]}),(0,r.jsx)("button",{type:"button",onClick:()=>F(t),className:"absolute -top-2 -right-2 bg-white p-1 rounded-full hover:bg-red-50 transition-colors z-10 shadow-sm",children:(0,r.jsx)(l.A,{className:"w-4 h-4 text-gray-500"})})]},t)}),0===b.files.length&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("input",{type:"file",id:"files",onChange:e=>{let t=Array.from(e.target.files||[]);if(t.filter(e=>e.size>0xa00000).length>0){j(e=>({...e,files:E.files.max}));return}v(e=>({...e,files:[t[0]]})),j(e=>{let{files:t,...a}=e;return a}),e.target.value=""},className:"hidden",accept:".pdf,.doc,.docx,.jpg,.jpeg,.png"}),(0,r.jsxs)("label",{htmlFor:"files",className:"w-[100px] h-[100px] border-2 border-dashed rounded-lg flex flex-col items-center justify-center gap-1 cursor-pointer transition-colors ".concat(y.files?"border-red-500 bg-red-50":"border-gray-200 hover:border-primary-500 hover:bg-primary-50"),children:[(0,r.jsx)(o.A,{className:"w-6 h-6 text-gray-400"}),(0,r.jsx)("span",{className:"body-3 text-gray-500",children:"Tải tệp"})]})]})]}),(0,r.jsx)("p",{className:"text-xs text-gray-500 mt-2",children:f("support_contact.attach.note")}),y.files&&(0,r.jsx)("p",{className:"text-red-500 text-sm mt-1",children:y.files})]}),w&&(0,r.jsxs)("div",{className:"w-full bg-primary-50/50 border border-primary-100 rounded-xl p-4 space-y-3 mb-4",children:[(0,r.jsxs)("div",{className:"flex justify-between items-center text-sm",children:[(0,r.jsx)("span",{className:"font-medium text-gray-700 truncate max-w-[75%]",children:A||f("support_contact.processing")}),C>0&&(0,r.jsxs)("span",{className:"font-semibold text-primary-600",children:[C,"%"]})]}),C>0&&(0,r.jsx)("div",{className:"w-full h-2.5 bg-gray-100 rounded-full overflow-hidden",children:(0,r.jsx)("div",{className:"h-full bg-gradient-to-r from-primary-500 to-primary-600 rounded-full transition-all duration-300 ease-out",style:{width:"".concat(C,"%")}})})]}),(0,r.jsxs)("div",{className:"pt-4",children:[y.submit&&(0,r.jsx)("p",{className:"text-red-500 text-sm mb-2",children:y.submit}),(0,r.jsx)("button",{type:"submit",disabled:w,className:"w-full bg-primary-600 cursor-pointer label-2 text-white py-3 px-4 rounded-lg hover:bg-primary-700 disabled:opacity-50 disabled:cursor-not-allowed transition-colors flex items-center justify-center",children:w?(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)("div",{className:"animate-spin rounded-full h-4 w-4 border-b-2 border-white mr-2"}),f("support_contact.processing")]}):(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)(d.A,{className:"w-4 h-4 mr-2"}),f("support_contact.submit")]})})]})]})]})}),!k&&(0,r.jsx)("div",{className:"w-full lg:w-1/2 relative h-64 lg:h-auto max-lg:hidden",children:(0,r.jsx)(c.default,{src:"/images/form-image.webp",alt:"Li\xean hệ hỗ trợ",objectFit:"cover",priority:!0,width:448,height:593,className:"w-full h-full object-cover"})})]})]})})}function b(){let{isContactSupportOpen:e,setIsContactSupportOpen:t}=(0,s.d)();return(0,r.jsx)(f,{isOpen:e,onClose:()=>t(!1)})}},27411:(e,t,a)=>{"use strict";a.d(t,{default:()=>n});var r=a(45704),s=a(66724),i=a(99018);function l(e){let{children:t}=e,[a,l]=(0,s.useState)(!1),[n,o]=(0,s.useState)(!1),d=(0,i.useSearchParams)();return((0,s.useEffect)(()=>{o(!0),"true"===d.get("bypass")?localStorage.setItem("bypass_maintenance","true"):localStorage.getItem("bypass_maintenance"),l(!1)},[d,!1]),n)?!0===a?(0,r.jsxs)("div",{className:"h-screen flex flex-col items-center justify-center w-screen bg-gray-50 text-center p-6 fixed inset-0 z-[9999]",children:[(0,r.jsx)("div",{className:"text-6xl mb-4",children:"\uD83D\uDEE0"}),(0,r.jsx)("h1",{className:"display-7 font-bold mb-2 text-primary-600",children:"Website đang cập nhật"}),(0,r.jsxs)("p",{className:"text-gray-600 body-2",children:["Xin ",(0,r.jsx)("span",{className:"font-semibold text-primary-600",children:"th\xf4ng cảm"})," ","cho ch\xfang t\xf4i v\xec sự bất tiện n\xe0y."]}),(0,r.jsx)("p",{className:"text-gray-400 mt-4 text-sm italic",children:"Cảm ơn bạn đ\xe3 ki\xean nhẫn chờ đợi"})]}):(0,r.jsx)(r.Fragment,{children:t}):(0,r.jsx)(r.Fragment,{children:t})}function n(e){let{children:t}=e;return(0,r.jsx)(s.Suspense,{fallback:(0,r.jsx)(r.Fragment,{children:t}),children:(0,r.jsx)(l,{children:t})})}},27983:(e,t,a)=>{"use strict";a.d(t,{default:()=>p});var r=a(45704),s=a(66724),i=a(2113),l=a(7662),n=a(74788),o=a(69920),d=a(93559),c=a(54173);function m(){let{consentStatus:e,acceptConsent:t,rejectConsent:a}=(0,i.u)(),[l,m]=(0,s.useState)(!1),u=(0,n.I)(),h=(0,c.c3)("cookie_consent");return(0,s.useEffect)(()=>{let e=setTimeout(()=>m(!0),50);return()=>clearTimeout(e)},[]),(0,r.jsx)(o.N,{children:l&&"pending"===e&&(0,r.jsx)(d.P.div,{variants:{hidden:u?{opacity:0}:{opacity:0,y:30,scale:.98},visible:{opacity:1,y:0,scale:1,transition:{duration:u?.1:.4,ease:[.25,1,.5,1]}},exit:u?{opacity:0}:{opacity:0,y:10,scale:.95}},initial:"hidden",animate:"visible",exit:"exit",className:"fixed bottom-4 md:bottom-6 md:left-6 left-4 z-[9998] bg-white rounded-lg shadow-xl max-w-[90%] md:max-w-[400px] text-gray-800 p-6 border border-gray-200",role:"dialog","aria-live":"polite","aria-labelledby":"cookie-consent-title","aria-describedby":"cookie-consent-description",children:(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{id:"cookie-consent-title",className:"title-2 mb-2",children:h("title")}),(0,r.jsxs)("p",{id:"cookie-consent-description",className:"text-[14px] leading-[150%] font-normal max-md:text-[12px] max-md:leading-[150%] mb-5 font-display",children:[h("description"),(0,r.jsx)("a",{href:"https://bvdaihoc.com.vn/chinh-sach/chinh-sach-cookie",target:"_self",className:"underline ml-1 text-primary",children:h("learn_more")})]}),(0,r.jsxs)("div",{className:"flex flex-col md:flex-row gap-3 font-display",children:[(0,r.jsx)("button",{onClick:()=>{a()},className:"border-none flex items-center justify-center cursor-pointer transition-all duration-300 ease-in-out px-3 w-full text-[14px] leading-[150%] font-bold max-md:text-[13px] max-md:leading-[150%] h-[41px] rounded-lg bg-gray-100 hover:bg-gray-200 text-gray-700 max-md:h-[33px]",children:h("reject_all")}),(0,r.jsx)("button",{onClick:()=>{t()},className:"border-none flex items-center justify-center cursor-pointer transition-all duration-300 ease-in-out px-3 w-full text-[14px] leading-[150%] font-bold max-md:text-[13px] max-md:leading-[150%] h-[41px] rounded-lg bg-primary-600 hover:bg-primary-400 text-white max-md:h-[33px]",children:h("accept_all")})]})]})},"cookie-consent-banner")})}var u=a(26927);function h(){let{consentStatus:e}=(0,i.u)();return((0,s.useEffect)(()=>{"1"===e&&window.gtag&&window.gtag("config","YOUR_MEASUREMENT_ID",{page_path:window.location.pathname})},[e]),"1"!==e)?null:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(u.default,{strategy:"afterInteractive",src:"https://www.googletagmanager.com/gtag/js?id=YOUR_MEASUREMENT_ID"}),(0,r.jsx)(u.default,{id:"ga-init",strategy:"afterInteractive",dangerouslySetInnerHTML:{__html:"\n window.dataLayer = window.dataLayer || [];\n function gtag(){dataLayer.push(arguments);}\n gtag('js', new Date());\n "}})]})}function p(e){let{children:t}=e;return(0,r.jsx)(i.O,{children:(0,r.jsxs)(l.$,{children:[t,(0,r.jsx)(m,{}),(0,r.jsx)(h,{})]})})}},28172:(e,t,a)=>{"use strict";a.d(t,{default:()=>i});var r=a(45704),s=a(26927);function i(){return(0,r.jsx)(s.default,{async:!0,src:"https://analytics.jamstackvietnam.com/js/plausible.js",onLoad:()=>{let e=document.querySelector('script[src="https://analytics.jamstackvietnam.com/js/plausible.js"]');e&&e.setAttribute("data-domain",window.location.host)}})}},29051:(e,t,a)=>{"use strict";a.d(t,{default:()=>u});var r=a(45704),s=a(66724),i=a(51265),l=a(58192),n=a(11878),o=a(64704),d=a(5507),c=a(54173),m=a(24293);function u(){let e=(0,o.n)(e=>e.isOTPOpen),t=(0,m.a8)(),a=null==t?void 0:t.endsWith("/patient/checkout"),u=(0,o.n)(e=>e.previousPopup),h=(0,o.n)(e=>e.closeAll),p=(0,o.n)(e=>e.openSignup),x=(0,o.n)(e=>e.openLogin),g=(0,o.n)(e=>e.openForgotPassword);(0,o.n)(e=>e.openResetPassword);let f=(0,o.n)(e=>e.openSuccess),b=(0,o.n)(e=>e.setPreviousPopup),v=(0,o.n)(e=>e.register),y=(0,o.n)(e=>e.resetPassword),j=(0,o.n)(e=>e.verifyLoginOTP),w=(0,o.n)(e=>e.otpAccGuid),N=(0,o.n)(e=>e.loginPhone),k=(0,o.n)(e=>e.setError),[_,C]=(0,s.useState)(["","","","","",""]),[S,A]=(0,s.useState)(""),[z,P]=(0,s.useState)(60),[E,M]=(0,s.useState)(!1),[L,F]=(0,s.useState)(!1),[I,T]=(0,s.useState)(!1),H=(0,s.useRef)(null),O=(0,s.useRef)([]),q=(0,c.c3)(),W=(0,m.rd)();(0,s.useEffect)(()=>{if(e&&z>0){let e=setInterval(()=>{P(e=>e<=1?(F(!0),0):e-1)},1e3);return()=>clearInterval(e)}},[e,z]),(0,s.useEffect)(()=>{e?(P(60),F(!1),setTimeout(()=>{var e;null===(e=O.current[0])||void 0===e||e.focus()},0)):(C(["","","","","",""]),A(""),P(60),F(!1),k(null))},[e,k]),(0,s.useEffect)(()=>{let t=t=>{e&&H.current&&!H.current.contains(t.target)&&!a&&(h(),b(null))};return e&&document.addEventListener("mousedown",t),()=>{document.removeEventListener("mousedown",t)}},[e,h,b,a]);let R=()=>{h(),b(null)},D=()=>{if("login"===u)return N;{let e=localStorage.getItem("signup_data");if(e)return JSON.parse(e).phone;let t=localStorage.getItem("forgot_password_phone");if(t)return t}return null},V=()=>{{let e=localStorage.getItem("signup_data");if(e)return JSON.parse(e)}return null},U=()=>{{let e=localStorage.getItem("reset_password_data");if(e)return JSON.parse(e)}return null},B=async()=>{let e=V();if(!e){A("Kh\xf4ng t\xecm thấy th\xf4ng tin đăng k\xfd");return}let{name:t,email:a,phone:r,password:s,key:i}=e;if(!i){A("Kh\xf4ng t\xecm thấy key x\xe1c thực");return}let l=t.trim().split(/\s+/),n=l[0]||"",o=l.slice(1).join(" ")||"";try{await v({key:i,email:a,phone:r,type:"phone",firstName:n,lastName:o,password:s}),localStorage.removeItem("signup_data")}catch(e){var d,c,m,u,h,p;A((null===(c=e.response)||void 0===c?void 0:null===(d=c.data)||void 0===d?void 0:d.message)||(null===(u=e.response)||void 0===u?void 0:null===(m=u.data)||void 0===m?void 0:m.error)||"Đăng k\xfd thất bại. Vui l\xf2ng thử lại."),(null===(p=e.response)||void 0===p?void 0:null===(h=p.data)||void 0===h?void 0:h.errors)&&(e.response.data.errors.phone&&A(e.response.data.errors.phone[0]),e.response.data.errors.password&&A(e.response.data.errors.password[0]))}},$=(e,t)=>{var a,r;let s=t.target.value.replace(/\D/g,"");if(s.length>1){let t=s.slice(0,6).split(""),r=[..._];t.forEach((t,a)=>{e+a<6&&(r[e+a]=t)}),C(r);let i=Math.min(e+t.length,5);O.current[i]&&(null===(a=O.current[i])||void 0===a||a.focus());return}let i=[..._];i[e]=s,C(i),A(""),s&&e<5&&(null===(r=O.current[e+1])||void 0===r||r.focus())},Y=(e,t)=>{if("Backspace"===t.key&&!_[e]&&e>0){var a;null===(a=O.current[e-1])||void 0===a||a.focus()}},K=e=>{e.preventDefault();let t=e.clipboardData.getData("text").replace(/\D/g,"");if(t.length>0){let e=[..._];for(let a=0;a{var e,t,a,r,s,i,l;A("");let n=_.join("");if(!n){A(q("authen_popup.passcode.error.required"));return}if(6!==n.length){A(q("authen_popup.passcode.error.min"));return}if(!/^\d{6}$/.test(n)){A(q("authen_popup.passcode.error.invalid"));return}if(!S){if("login"===u){if(!w){A(q("authen_popup.passcode.error.invalid"));return}}else if(!D()){A("Kh\xf4ng t\xecm thấy số điện thoại");return}T(!0);try{if("login"===u){await j(n);let e=o.n.getState();e.isAuthenticated&&e.redirectPath&&(W.push(e.redirectPath),o.n.setState({redirectPath:null}));return}let t=D(),a=await d.uE.post("/otps/verify",{otp:n,phone:t});(null===(e=a.data)||void 0===e?void 0:e.key)&&localStorage.setItem("otp_key",a.data.key),"forgot-password"===u?await G():"signup"===u?await B():(h(),f("signup"))}catch(e){A((null===(a=e.response)||void 0===a?void 0:null===(t=a.data)||void 0===t?void 0:t.message)||(null===(s=e.response)||void 0===s?void 0:null===(r=s.data)||void 0===r?void 0:r.error)||"M\xe3 OTP kh\xf4ng đ\xfang. Vui l\xf2ng thử lại."),(null===(l=e.response)||void 0===l?void 0:null===(i=l.data)||void 0===i?void 0:i.errors)&&(e.response.data.errors.otp&&A(e.response.data.errors.otp[0]),e.response.data.errors.phone&&A(e.response.data.errors.phone[0]))}finally{T(!1)}}},G=async()=>{let e=U(),t=D();if(!e||!t){A("Kh\xf4ng t\xecm thấy th\xf4ng tin đặt lại mật khẩu");return}let a=null;{let e=localStorage.getItem("otp_key");e&&(a=e)}if(!a){A("Kh\xf4ng t\xecm thấy key x\xe1c thực");return}try{await y({key:a,phone:t,newPassword:e.newPassword,confirmPassword:e.confirmPassword}),localStorage.removeItem("reset_password_data"),localStorage.removeItem("otp_key")}catch(e){var r,s,i,l,n,o;A((null===(s=e.response)||void 0===s?void 0:null===(r=s.data)||void 0===r?void 0:r.message)||(null===(l=e.response)||void 0===l?void 0:null===(i=l.data)||void 0===i?void 0:i.error)||"Đặt lại mật khẩu thất bại. Vui l\xf2ng thử lại."),(null===(o=e.response)||void 0===o?void 0:null===(n=o.data)||void 0===n?void 0:n.errors)&&(e.response.data.errors.newPassword&&A(e.response.data.errors.newPassword[0]),e.response.data.errors.confirmPassword&&A(e.response.data.errors.confirmPassword[0]))}};return(0,r.jsx)(r.Fragment,{children:e&&(0,r.jsxs)("div",{className:"fixed inset-0 flex items-center justify-center z-[100]",children:[(0,r.jsx)("div",{className:"absolute bg-black opacity-70 inset-0 cursor-pointer",onClick:a?void 0:R}),(0,r.jsx)("div",{className:"relative z-10 max-h-[100svh] p-4 w-full overflow-y-auto",children:(0,r.jsx)("div",{className:"flex items-center justify-center",children:(0,r.jsxs)("div",{ref:H,className:"bg-white rounded-lg md:pt-12 md:pb-8 md:px-6 pt-12 pb-4 px-4 max-w-md w-full relative",children:[(0,r.jsxs)("button",{className:"absolute text-primary-600 xl:top-4 md:top-3 top-2 xl:left-4 md:left-3 left-2 text-gray-500 hover:text-gray-700 cursor-pointer flex items-center gap-1",onClick:()=>{h(),"signup"===u?p():"forgot-password"===u?g():"login"===u&&x()},children:[(0,r.jsx)(i.A,{className:"md:size-5 size-4"}),(0,r.jsx)("span",{className:"body-2",children:q("authen_popup.passcode.back")})]}),!a&&(0,r.jsx)("button",{className:"absolute xl:top-4 md:top-3 top-2 xl:right-4 md:right-3 right-2 text-gray-500 hover:text-gray-700 cursor-pointer",onClick:R,children:(0,r.jsx)(l.A,{size:20})}),(0,r.jsx)("div",{className:"flex items-center justify-center mb-2",children:(0,r.jsx)(n.p,{src:"/images/logo.webp",alt:"UMC Care logo",width:242,height:45,priority:!0})}),(0,r.jsx)("p",{className:"text-center body-3 text-gray-600 mb-0.5",children:q("authen_popup.passcode.description")}),(0,r.jsx)("p",{className:"text-center body-4 text-primary-600 xl:mb-6 md:mb-5 mb-4 px-4",children:q("authen_popup.passcode.description_2")}),(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"mb-8",children:[(0,r.jsx)("div",{className:"flex justify-center gap-2 md:gap-3",children:_.map((e,t)=>(0,r.jsx)("input",{ref:e=>{O.current[t]=e},type:"text",inputMode:"numeric",maxLength:1,value:e,onChange:e=>$(t,e),onKeyDown:e=>Y(t,e),onPaste:K,className:"size-12 md:size-14 outline-none text-center text-xl md:text-2xl font-semibold border-2 rounded-lg ".concat(S?"border-red-500 focus:border-red-500":"border-gray-300 focus:border-primary-500 focus-visible:border-primary-500")},t))}),S&&(0,r.jsx)("p",{className:"text-red-500 body-4 mt-3 text-center",children:S})]}),(0,r.jsx)("div",{className:"space-y-3",children:(0,r.jsx)("button",{className:"w-full btn btn-light label-2 max-md:!px-4 disabled:opacity-50 disabled:cursor-not-allowed",onClick:Q,disabled:I,children:I?q("authen_popup.passcode.loading"):q("authen_popup.passcode.button")})})]})]})})})]})})}},30487:(e,t,a)=>{"use strict";a.d(t,{s:()=>s});var r=a(72761);let s=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"vi";return(0,r.gf)("health-library-classifications",{fields:["id","name","slug"],filters:{status:{_eq:"published"}},sort:[{column:"position",order:"desc"},{column:"createdAt",order:"desc"}],pagination:!1,locale:e})}},37882:(e,t,a)=>{"use strict";a.d(t,{default:()=>L});var r=a(45704),s=a(66724);let i=(e,t)=>{(0,s.useEffect)(()=>{let a=a=>{let r=null==e?void 0:e.current;!r||r.contains(a.target||null)||t(a)};return document.addEventListener("mousedown",a),document.addEventListener("touchstart",a),()=>{document.removeEventListener("mousedown",a),document.removeEventListener("touchstart",a)}},[e,t])};var l=a(73812),n=a(86166),o=a(58192),d=a(62847);let c=e=>{let{className:t="",...a}=e;return(0,r.jsx)("svg",{width:"10",height:"5",viewBox:"0 0 10 5",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,...a,children:(0,r.jsx)("path",{d:"M0.759766 0.5L4.68906 4.42929C4.72811 4.46834 4.79142 4.46834 4.83048 4.42929L8.75977 0.5",stroke:"currentColor",strokeLinecap:"round"})})};var m=a(11878),u=a(24293),h=a(14762);function p(e){let{title:t,href:a,children:i,onClose:l,onClick:n,isWhiteAccordion:o=!1,wrapperClassName:d="",childrenWrapperClassName:c="",titlePaddingLeft:m=""}=e,[p,x]=(0,s.useState)(!1),g=n||l;return!i&&a?(0,r.jsx)(u.N_,{href:a,className:"flex items-center justify-between lg:p-4 md:p-3 p-2 border-b border-gray-100 last:border-b-0 ".concat(m),onClick:g,children:(0,r.jsx)("span",{className:"".concat(o?"body-3 text-white":"title-1 text-primary-600"),children:t})}):i||a||!n?(0,r.jsxs)("div",{className:"border-b border-gray-100 ".concat(d),children:[(0,r.jsxs)("div",{className:"flex w-full items-center justify-between ".concat(m),children:[a?(0,r.jsx)(u.N_,{href:a,className:"flex-1 flex items-center",onClick:g,children:(0,r.jsx)("span",{className:"".concat(o?"body-3 text-white":"title-1 text-primary-600"),children:t})}):n?(0,r.jsx)("button",{onClick:n,className:"flex-1 flex items-center text-left",children:(0,r.jsx)("span",{className:"".concat(o?"body-3 text-white":"title-1 text-primary-600"),children:t})}):(0,r.jsx)("span",{className:"flex-1 ".concat(o?"body-3 text-white":"title-1 text-primary-600"),children:t}),(0,r.jsx)("button",{onClick:()=>x(!p),className:"ml-2 p-1 flex items-center justify-center",children:(0,r.jsx)(h.A,{className:"w-5 h-5 transition-transform duration-200 text-gray-600 ".concat(p?"rotate-0":"-rotate-90")})})]}),(0,r.jsx)("div",{className:"overflow-hidden transition-all duration-200 ".concat(p?"max-h-[2000px]":"max-h-0"),children:(0,r.jsx)("div",{className:"".concat(c),children:i})})]}):(0,r.jsx)("button",{onClick:n,className:"flex items-center justify-between lg:p-4 md:p-3 p-2 border-b border-gray-100 last:border-b-0 w-full text-left ".concat(m),children:(0,r.jsx)("span",{className:"".concat(o?"body-3 text-white":"title-1 text-primary-600"),children:t})})}var x=a(7283),g=a(99018),f=a(7662),b=a(80578);let v=e=>{let{className:t="",...a}=e;return(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 85.333 512 341.333",className:t,...a,children:[(0,r.jsx)("path",{fill:"#D80027",d:"M196.641 85.337H0v341.326h512V85.337z"}),(0,r.jsx)("path",{fill:"#FFDA44",d:"m256 157.279 22.663 69.747H352l-59.332 43.106 22.664 69.749L256 296.774l-59.332 43.107 22.664-69.749L160 227.026h73.337z"})]})},y=e=>{let{className:t="",...a}=e;return(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342",className:t,...a,children:[(0,r.jsx)("path",{fill:"#FFF",d:"M0 0h513v342H0z"}),(0,r.jsx)("g",{fill:"#D80027",children:(0,r.jsx)("path",{d:"M0 0h513v26.3H0zM0 52.6h513v26.3H0zM0 105.2h513v26.3H0zM0 157.8h513v26.3H0zM0 210.5h513v26.3H0zM0 263.1h513v26.3H0zM0 315.7h513V342H0z"})}),(0,r.jsx)("path",{fill:"#2E52B2",d:"M0 0h256.5v184.1H0z"}),(0,r.jsx)("g",{fill:"#FFF",children:(0,r.jsx)("path",{d:"m47.8 138.9-4-12.8-4.4 12.8H26.2l10.7 7.7-4 12.8 10.9-7.9 10.6 7.9-4.1-12.8 10.9-7.7zM104.1 138.9l-4.1-12.8-4.2 12.8H82.6l10.7 7.7-4 12.8 10.7-7.9 10.8 7.9-4-12.8 10.7-7.7zM160.6 138.9l-4.3-12.8-4 12.8h-13.5l11 7.7-4.2 12.8 10.7-7.9 11 7.9-4.2-12.8 10.7-7.7zM216.8 138.9l-4-12.8-4.2 12.8h-13.3l10.8 7.7-4 12.8 10.7-7.9 10.8 7.9-4.3-12.8 11-7.7zM100 75.3l-4.2 12.8H82.6L93.3 96l-4 12.6 10.7-7.8 10.8 7.8-4-12.6 10.7-7.9h-13.4zM43.8 75.3l-4.4 12.8H26.2L36.9 96l-4 12.6 10.9-7.8 10.6 7.8L50.3 96l10.9-7.9H47.8zM156.3 75.3l-4 12.8h-13.5l11 7.9-4.2 12.6 10.7-7.8 11 7.8-4.2-12.6 10.7-7.9h-13.2zM212.8 75.3l-4.2 12.8h-13.3l10.8 7.9-4 12.6 10.7-7.8 10.8 7.8-4.3-12.6 11-7.9h-13.5zM43.8 24.7l-4.4 12.6H26.2l10.7 7.9-4 12.7L43.8 50l10.6 7.9-4.1-12.7 10.9-7.9H47.8zM100 24.7l-4.2 12.6H82.6l10.7 7.9-4 12.7L100 50l10.8 7.9-4-12.7 10.7-7.9h-13.4zM156.3 24.7l-4 12.6h-13.5l11 7.9-4.2 12.7 10.7-7.9 11 7.9-4.2-12.7 10.7-7.9h-13.2zM212.8 24.7l-4.2 12.6h-13.3l10.8 7.9-4 12.7 10.7-7.9 10.8 7.9-4.3-12.7 11-7.9h-13.5z"})})]})};var j=a(5552),w=a(54173),N=a(64704);function k(e){let{item:t,onClose:a,level:s=1}=e,{setIsContactSupportOpen:i}=(0,j.d)(),l=t.items&&t.items.length>0,n=1===s?"pl-4":"pl-8",o="popup"===t.type&&"contact-support"===t.action,d=o?()=>{i(!0),a()}:void 0;if(l){var c;return(0,r.jsx)(p,{title:t.title,href:o?void 0:t.slug,onClose:a,onClick:d,isWhiteAccordion:!1,wrapperClassName:"py-2",childrenWrapperClassName:"pt-2",titlePaddingLeft:n,children:(0,r.jsx)("div",{className:"space-y-2",children:null===(c=t.items)||void 0===c?void 0:c.map(e=>(0,r.jsx)(u.N_,{href:e.slug,className:"block py-2.5 body-2 max-md:!text-[14px] text-black pl-8",onClick:a,children:e.title},"sub-item-".concat(e.id)))})})}return(0,r.jsx)(p,{title:t.title,href:o?void 0:t.slug,onClose:a,onClick:d,isWhiteAccordion:!1,wrapperClassName:"py-2",titlePaddingLeft:n})}function _(e){let{menus:t}=e,a=(0,w.c3)(),{isMobileMenuOpen:i,setIsMobileMenuOpen:l}=(0,f.H)(),n=(0,u.a8)(),o=(0,x.Ym)(),d=(0,u.XX)(),c=(0,g.useSearchParams)(),h=(0,u.rd)();(0,N.n)(e=>e.openLogin),(0,N.n)(e=>e.isAuthenticated);let j=(0,s.useMemo)(()=>b.U7.some(e=>n===e||n.startsWith(e+"/"))?"patient":b.Ij.some(e=>n===e||n.startsWith(e+"/"))?"medical":b.c$.some(e=>n===e||n.startsWith(e+"/"))?"umc":b.wY.some(e=>n===e||n.startsWith(e+"/"))?"patient":"patient",[n]),_=e=>{var t;let a=null!==(t=d[e])&&void 0!==t?t:{},r={pathname:n};if(Object.keys(a).length>0&&!a.slug){h.push("/",{locale:e});return}Object.keys(a).length>0&&(r.params={...a});let s=c.get("q");s&&(r.query={q:s});try{h.push(r,{locale:e})}catch(t){h.push("/",{locale:e})}};return(0,r.jsxs)("div",{className:"fixed inset-x-0 top-[122px] h-[calc(100svh)] bg-gray-100 z-[49] transition-transform duration-300 xl:hidden ".concat(i?"translate-y-0":"-translate-y-full"),children:[(0,r.jsx)("div",{className:"relative",children:(0,r.jsxs)("div",{className:"max-h-[calc(100svh-196px)] overflow-y-auto",children:[(0,r.jsx)("div",{className:"p-4",children:(0,r.jsx)("div",{className:"bg-primary-600 rounded-md title-6 text-white p-4",children:"medical"===j?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(u.N_,{href:"/patient/specialty",onClick:()=>l(!1),className:"pb-3 border-b border-white block",children:a("header.pre_header.specialty")}),(0,r.jsx)(u.N_,{href:"/patient/doctor",onClick:()=>l(!1),className:"py-3 border-b border-white block",children:a("header.pre_header.doctor")}),(0,r.jsx)(u.N_,{href:"/medical/career",onClick:()=>l(!1),className:"pt-3 block",children:a("header.pre_header.career")})]}):"umc"===j?(0,r.jsx)(u.N_,{href:{pathname:"/umcers",hash:"#contribution-section"},onClick:()=>l(!1),className:"block",children:a("header.pre_header.donate")}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(u.N_,{href:"/patient/umc",onClick:()=>l(!1),className:"flex items-center space-x-1.5 pb-3 border-b border-white",children:[(0,r.jsx)(m.p,{src:"/pre-logo.png",alt:"logo pre header",width:21,height:21,priority:!0,className:"rounded"}),(0,r.jsx)("div",{children:a("header.pre_header.umc_app")})]}),(0,r.jsx)(u.N_,{href:"/patient/checkout",onClick:()=>l(!1),className:"py-3 border-b border-white block",children:a("header.pre_header.booking")}),(0,r.jsx)(u.N_,{href:"/patient/bidding",onClick:()=>l(!1),className:"pt-3 block",children:a("header.pre_header.bidding")})]})})}),(0,r.jsx)("div",{className:"bg-gray-100",children:(0,r.jsx)("div",{className:"px-4",children:t.map((e,t)=>{var a;let s=e.slug,i=e.children&&e.children.length>0;return(0,r.jsx)("div",{children:i?(0,r.jsx)(p,{title:e.title,href:s,onClose:()=>l(!1),isWhiteAccordion:!1,wrapperClassName:"py-3",childrenWrapperClassName:"pt-3.5 space-y-2",titlePaddingLeft:"",children:null===(a=e.children)||void 0===a?void 0:a.map(e=>(0,r.jsx)(k,{item:e,onClose:()=>l(!1),level:1},"child-".concat(e.id)))}):(0,r.jsx)(u.N_,{href:s,onClick:()=>l(!1),className:"flex flex-shrink-0 title-1 py-3 justify-between items-center duration-150 ease-in-out text-primary-600 border-b border-gray-100",children:(0,r.jsx)("span",{children:e.title})})},"mobile-".concat(e.id))})})})]})}),(0,r.jsxs)("div",{className:"p-4 flex justify-start items-center space-x-2 bg-gray-100 sticky bottom-0",children:[(0,r.jsx)("div",{className:"h-[42px] text-center flex items-center justify-center body-3 text-gray-700",onClick:()=>_("vi"),children:(0,r.jsxs)("div",{className:"flex items-center justify-center ".concat("vi"===o?"opacity-100":"opacity-30"),children:[(0,r.jsx)(v,{className:"w-5 flex-shrink-0"}),(0,r.jsx)("span",{className:"ml-1",children:"Tiếng việt"})]})}),(0,r.jsx)("div",{className:"h-3 w-px bg-gray-200"}),(0,r.jsx)("div",{className:"h-[42px] text-center flex items-center justify-center body-3 text-gray-700",onClick:()=>_("en"),children:(0,r.jsxs)("div",{className:"flex items-center justify-center ".concat("en"===o?"opacity-100":"opacity-30"),children:[(0,r.jsx)(y,{className:"w-5 flex-shrink-0"}),(0,r.jsx)("span",{className:"ml-1",children:"English"})]})})]})]})}function C(e){let{currentMenuItem:t,activeLevel2Item:a,setActiveLevel2Item:i,searchInputRef:n,setOpenMegaMenu:o}=e,{setIsContactSupportOpen:d}=(0,j.d)(),[c,h]=(0,s.useState)(""),[p,x]=(0,s.useState)(""),g=(0,w.c3)();(0,s.useEffect)(()=>{let e=setTimeout(()=>{x(c)},500);return()=>clearTimeout(e)},[c]);let f=(0,s.useMemo)(()=>{if(!(null==t?void 0:t.children)||!p.trim())return{filteredChildren:(null==t?void 0:t.children)||[],hasActiveItems:!0};let e=p.toLowerCase().trim(),a=t.children.map(t=>{var a;let r=null===(a=t.items)||void 0===a?void 0:a.filter(t=>{var a;return null===(a=t.title)||void 0===a?void 0:a.toLowerCase().includes(e)});return{...t,items:r||[]}}).filter(e=>e.items&&e.items.length>0);return{filteredChildren:a,hasActiveItems:a.length>0}},[null==t?void 0:t.children,p]);return(0,s.useEffect)(()=>{a&&p.trim()&&!f.filteredChildren.some(e=>e.id===a.itemId)&&i(null)},[p,f.filteredChildren,a,i]),(0,r.jsxs)("div",{className:"container mx-auto grid grid-cols-12 gap-[38px] py-[46px] divide-x divide-primary-75",onMouseLeave:()=>{i(null)},children:[(0,r.jsx)("div",{className:"col-span-4 space-y-[46px] pr-[38px]",children:(0,r.jsxs)("div",{className:"space-y-[22px]",children:[(0,r.jsx)("div",{className:"display-7 text-primary-600",children:null==t?void 0:t.title}),(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsx)("p",{className:"body-3 text-gray-600 text-justify",children:null==t?void 0:t.description}),(null==t?void 0:t.description_secondary)&&(0,r.jsx)("p",{className:"body-3 text-gray-600 text-justify",children:null==t?void 0:t.description_secondary})]}),(null==t?void 0:t.id)==="departments"&&(0,r.jsxs)("div",{className:"flex space-x-1.5",children:[(0,r.jsx)("input",{ref:n,type:"text",placeholder:g("common.search"),value:c,onChange:e=>h(e.target.value),className:"flex-1 body-2 px-[18px] py-3.5 border border-primary-75 focus:outline-none focus:border-primary-600 placeholder:text-gray-500"}),(0,r.jsx)("div",{className:"size-[52px] bg-primary-400 flex items-center justify-center cursor-pointer lg:hover:bg-primary-600 lg:duration-150",children:(0,r.jsx)(l.A,{className:"size-[18px] text-primary-75"})})]})]})}),(0,r.jsx)("div",{className:"col-span-4 pr-[38px] overflow-hidden",children:(0,r.jsx)("div",{className:"space-y-4 flex flex-col max-h-[280px] overflow-y-auto pr-2 scrollbar-thin scrollbar-thumb-gray-200 scrollbar-track-transparent hover:scrollbar-thumb-primary/50",children:f.filteredChildren.map(e=>{let s=e.slug;return"external"===e.type?(0,r.jsx)("a",{href:"tel:".concat(e.href),className:"title-4 menu-link",target:"_blank",rel:"noopener noreferrer nofollow",onClick:()=>o(null),children:(0,r.jsx)("span",{children:e.title})},"external-menu-".concat(e.id)):"popup"===e.type?(0,r.jsx)("button",{className:"title-4 menu-link text-left cursor-pointer",onClick:()=>{"contact-support"===e.action&&d(!0),o(null)},children:(0,r.jsx)("span",{children:e.title})},"popup-menu-".concat(e.id)):(0,r.jsx)(u.N_,{href:s,className:"title-4 menu-link ".concat((null==a?void 0:a.itemId)===e.id?"active":"inactive"),onClick:()=>{var t;o(null),"object"==typeof e.slug&&(null===(t=e.slug)||void 0===t?void 0:t.hash)&&setTimeout(()=>{let t=document.getElementById(e.slug.hash.slice(1));if(t){let e=t.getBoundingClientRect().top+window.pageYOffset-140;window.scrollTo({top:e,behavior:"smooth"})}},300)},onMouseEnter:()=>{var a;(null===(a=e.items)||void 0===a?void 0:a.length)?i({menuId:t.id,itemId:e.id}):i(null)},children:(0,r.jsx)("span",{children:e.title})},"internal-menu-".concat(e.id))})})}),(0,r.jsx)("div",{className:"col-span-4",children:(0,r.jsx)("div",{className:"space-y-4 max-h-[280px] overflow-y-auto",children:p.trim()?(()=>{let e=[];return(f.filteredChildren.forEach(t=>{t.items&&t.items.length>0&&e.push(...t.items)}),0===e.length)?(0,r.jsx)("div",{className:"body-2 text-gray-500",children:"Kh\xf4ng t\xecm thấy chuy\xean khoa n\xe0o"}):e.map(e=>{let t=e.slug;return(0,r.jsx)(u.N_,{href:t,className:"title-4 menu-link",onClick:()=>o(null),children:(0,r.jsx)("span",{children:e.title})},"filtered-item-".concat(e.id))})})():a?(()=>{var e;let t=f.filteredChildren.find(e=>e.id===a.itemId);return t&&(null===(e=t.items)||void 0===e?void 0:e.length)?t.items.map(e=>{let t=e.slug;return(0,r.jsx)(u.N_,{href:t,className:"title-4 menu-link",onClick:()=>o(null),children:(0,r.jsx)("span",{children:e.title})},"level-2-menu-".concat(e.id))}):(0,r.jsx)("div",{className:"body-2 text-gray-500",children:"Kh\xf4ng t\xecm thấy chuy\xean khoa n\xe0o"})})():(null==t?void 0:t.image)&&(0,r.jsx)("div",{className:"relative aspect-[3/2] w-full overflow-hidden rounded-lg",children:(0,r.jsx)(m.p,{src:t.image,alt:t.title,fill:!0,className:"transition-transform duration-150 hover:scale-105",objectFit:"cover"})})})})]})}var S=a(69920),A=a(93559),z=a(30487),P=a(72761),E=a(72572),M=a(2113);function L(){let e=(0,w.c3)(),t=(0,s.useMemo)(()=>[{id:"about",title:e("header.menu.about"),slug:"/about/overview",image:"/images/header/menu-about.jpg",description:e("header.sub_menu.about.description"),description_secondary:e("header.sub_menu.about.description_secondary"),children:[{id:"overview",title:e("header.menu.overview"),slug:{pathname:"/about/overview",params:{}}},{id:"history",title:e("header.menu.history"),slug:{pathname:"/about/history",params:{}}},{id:"core_values",title:e("header.menu.vision"),slug:{pathname:"/about/core-values",params:{}}},{id:"leaders",title:e("header.menu.leader"),slug:{pathname:"/about/leader",params:{}}},{id:"department",title:e("header.menu.department"),slug:{pathname:"/about/departments",params:{}}},{id:"awards",title:e("header.menu.award"),slug:{pathname:"/about/awards",params:{}}},{id:"contact",title:e("header.menu.contact"),slug:{pathname:"/about/contact",params:{}}}]},{id:"training",title:e("header.menu.training"),slug:"/medical/training",image:"/images/header/menu-about.jpg",description:e("header.sub_menu.training"),children:[{id:"training-0",title:e("header.menu.training_certificate"),slug:{pathname:"/medical/training/training-list"}},{id:"training-1",title:e("header.menu.clinical_practice"),slug:{pathname:"/medical/clinical-practice-training"}},{id:"training-2",title:e("header.menu.facilities_announcement"),slug:{pathname:"/medical/facilities-announcement"}},{id:"training-3",title:e("header.menu.intern_training"),slug:{pathname:"/medical/student-intern-training"}},{id:"training-4",title:e("header.menu.transfer_training"),slug:{pathname:"/medical/training/technology-transfer"}},{id:"training-5",title:e("header.menu.training_list"),slug:{pathname:"/medical/training/trainer"}},{id:"training-6",title:e("header.menu.training_completed_list"),slug:{pathname:"/medical/training/completed-trainer"}}]},{id:"research",title:e("header.menu.science_research"),slug:"/medical/research",image:"/images/header/menu-about.jpg",description:e("header.sub_menu.science_research"),children:[]},{id:"international-collaboration",title:e("header.menu.international_collaboration"),slug:"/medical/international-collaboration",image:"/images/header/menu-about.jpg",description:e("header.sub_menu.international_collaboration"),children:[]},{id:"science-event",title:e("header.menu.event"),slug:"/medical/science-event",image:"/images/header/menu-about.jpg",description:""},{id:"news",title:e("header.menu.post"),slug:"/medical/blog",image:"/images/header/menu-news.jpg",description:e("header.sub_menu.medical_blog"),children:[]}],[e]),a=(0,s.useMemo)(()=>[{id:"about",title:e("header.menu.about"),slug:"/about/overview",image:"/images/header/menu-about.jpg",description:e("header.sub_menu.about.description"),description_secondary:e("header.sub_menu.about.description_secondary"),children:[{id:"overview",title:e("header.menu.overview"),slug:{pathname:"/about/overview",params:{}}},{id:"history",title:e("header.menu.history"),slug:{pathname:"/about/history",params:{}}},{id:"core_values",title:e("header.menu.vision"),slug:{pathname:"/about/core-values",params:{}}},{id:"leaders",title:e("header.menu.leader"),slug:{pathname:"/about/leader",params:{}}},{id:"department",title:e("header.menu.department"),slug:{pathname:"/about/departments",params:{}}},{id:"awards",title:e("header.menu.award"),slug:{pathname:"/about/awards",params:{}}},{id:"contact",title:e("header.menu.contact"),slug:{pathname:"/about/contact",params:{}}}]},{id:"news-events",title:e("header.menu.blog"),slug:"/umcers/blog",image:"/images/header/menu-news.jpg",description:e("header.sub_menu.umcers_blog"),children:[]},{id:"training-development",title:e("header.menu.training_development"),slug:{pathname:"/umcers/training-blog"},image:"/images/header/menu-support.webp",description:""},{id:"internal-corner",title:e("header.menu.internal_corner"),slug:{pathname:"/umcers/internal-corner"},image:"/images/header/menu-support.webp",description:e("header.sub_menu.internal_corner"),children:[{id:"umcers-proud",title:e("header.menu.umcers_proud"),slug:{pathname:"/umcers/internal-corner/umcers-proud"}},{id:"white-coat-story",title:e("header.menu.video_corner"),slug:{pathname:"/umcers/internal-corner/video"}},{id:"patient-sharing",title:e("header.menu.patient_sharing"),slug:{pathname:"/umcers/internal-corner/patient-sharing"}}]}],[e]),h=(0,s.useCallback)((t,a,r,s)=>{let i=(null==r?void 0:r.reduce((e,t)=>{let a=t.specialtyCategoryId;e[a]||(e[a]=[]);let r=t.slug||"";return e[a].push({id:"specialty-".concat(t.id),title:t.name||"",slug:{pathname:"/patient/specialty/[slug]",params:{slug:r}}}),e},{}))||{};return[{id:"about",title:e("header.menu.about"),slug:"/about/overview",image:"/images/header/menu-about.jpg",description:e("header.sub_menu.about.description"),description_secondary:e("header.sub_menu.about.description_secondary"),children:[{id:"overview",title:e("header.menu.overview"),slug:{pathname:"/about/overview",params:{}}},{id:"history",title:e("header.menu.history"),slug:{pathname:"/about/history",params:{}}},{id:"core_values",title:e("header.menu.vision"),slug:{pathname:"/about/core-values",params:{}}},{id:"leaders",title:e("header.menu.leader"),slug:{pathname:"/about/leader",params:{}}},{id:"department",title:e("header.menu.department"),slug:{pathname:"/about/departments",params:{}}},{id:"awards",title:e("header.menu.award"),slug:{pathname:"/about/awards",params:{}}},{id:"contact",title:e("header.menu.contact"),slug:{pathname:"/about/contact",params:{}}}]},{id:"departments",title:e("header.menu.specialty"),slug:{pathname:"/patient/specialty"},image:"/images/header/menu-specialty-team.webp",description:e("header.sub_menu.specialty"),children:(null==a?void 0:a.map(e=>({id:"category-".concat(e.id),title:e.name||"",slug:{pathname:"/patient/specialty",params:{},query:{category:e.slug||""}},items:i[e.id]||[]})))||[]},{id:"doctor",title:e("header.menu.doctor"),slug:{pathname:"/patient/doctor",params:{}}},{id:"services",title:e("header.menu.service"),slug:{pathname:"/patient/service",params:{}},image:"/images/header/menu-service.jpg",description:e("header.sub_menu.service"),children:[{id:"services-outpatient-examination",title:e("header.menu.outpatient_examination"),slug:{pathname:"/patient/service",hash:"#".concat(e("service.section_hash.outpatient_examination"))}},{id:"services-inpatient-treatment",title:e("header.menu.inpatient_treatment"),slug:{pathname:"/patient/service",hash:"#".concat(e("service.section_hash.inpatient_treatment")),query:{tabName:"inpatient-treatment"}}},{id:"services-emergency",title:e("header.menu.emergency"),slug:{pathname:"/patient/service",hash:"#".concat(e("service.section_hash.inpatient_treatment")),query:{tabName:"emergency"}}},{id:"services-price-list",title:e("header.menu.price_list"),slug:{pathname:"/patient/service",hash:"#".concat(e("service.section_hash.price_list"))}}]},{id:"health-library",title:e("header.menu.health_library"),slug:{pathname:"/patient/library",params:{}},image:"/images/header/menu-library.webp",description:e("header.sub_menu.health_library"),children:(null==t?void 0:t.map(e=>({id:"library-category-".concat(e.id),title:e.name||"",slug:{pathname:"/patient/library",query:{category:e.slug||""}}})))||[]},{id:"news",title:e("header.menu.blog"),slug:{pathname:"/patient/blog"},image:"/images/header/menu-news.jpg",description:"",children:(()=>{let t=Array.isArray(s)?s.map(e=>{let t=e.slug||"";return{id:"category-".concat(e.id),title:(null==e?void 0:e.title)||(null==e?void 0:e.name)||"",slug:{pathname:"/patient/blog/[category]",params:{category:t}}}}):[];return[...t.slice(0,3),{id:"news-3",title:e("header.menu.social_network"),slug:{pathname:"/patient/social-network"}},...t.slice(3)]})()},{id:"support",title:e("header.menu.customer_support"),slug:{pathname:"/patient/customer-knowledge"},image:"/images/header/menu-support.webp",children:[{id:"before-visit",title:e("header.menu.customer_knowledge"),slug:{pathname:"/patient/customer-knowledge",params:{}}},{id:"during-visit",title:e("header.menu.donate_organ"),slug:{pathname:"/patient/contribute",params:{}}},{id:"faq",title:e("header.menu.faq"),slug:{pathname:"/patient/faq",params:{}}},{id:"contact",title:e("header.menu.contact_support"),slug:{pathname:"/",params:{}},type:"popup",action:"contact-support"}]}]},[e]),p=e=>{var t;let a=new Set,r=e=>{if(!e)return;let t="";"string"==typeof e?t=e:e.pathname&&(t=e.pathname),t&&a.add(t)};return r(e.slug),null===(t=e.children)||void 0===t||t.forEach(e=>{if("popup"!==e.type){var t;r(e.slug),null===(t=e.items)||void 0===t||t.forEach(e=>r(e.slug))}}),Array.from(a)},g=(e,t)=>!!t&&("/"===t?"/"===e:!!(e===t||e.startsWith("".concat(t,"/")))||("/about/awards"===t?e.startsWith("/detail-award/"):"/about/departments"===t&&e.startsWith("/detail-department/"))),v=(e,t)=>b.U7.some(t=>e===t||e.startsWith(t+"/"))?t||"patient":b.Ij.some(t=>e===t||e.startsWith(t+"/"))?"medical":b.c$.some(t=>e===t||e.startsWith(t+"/"))?"umc":b.wY.some(t=>e===t||e.startsWith(t+"/"))?"patient":t||"patient",y=(0,u.a8)();(0,u.rd)();let[j,k]=(0,s.useState)(null),L=(0,s.useRef)(null),[F,I]=(0,s.useState)(null),T=(0,s.useRef)(null),{isMobileMenuOpen:H,setIsMobileMenuOpen:O}=(0,f.H)(),q=(0,x.Ym)(),W=(0,N.n)(e=>e.openLogin),R=(0,N.n)(e=>e.isAuthenticated),[D,V]=(0,s.useState)(!1);(0,s.useEffect)(()=>{V(!0)},[]);let U=D&&new Date().getTime(){if(!y)return"/";if(!q)return y;let e="/".concat(q);return y===e?"/":y.startsWith("".concat(e,"/"))?y.slice(e.length)||"/":y},[y,q]),ee=(0,s.useMemo)(()=>{let e=v(y,D&&"1"===Z?(0,E.Ri)("homeType"):null),r=Array.isArray(null==Q?void 0:Q.data)?Q.data.map(e=>{var t;let a="string"==typeof(null==e?void 0:e.slug)?e.slug:(null==e?void 0:null===(t=e.slug)||void 0===t?void 0:t[q])||"";return{id:"category-".concat(e.id),title:(null==e?void 0:e.title)||(null==e?void 0:e.name)||"",slug:{pathname:"/umcers/blog/[category]",params:{category:a}}}}):[],s=Array.isArray(null==G?void 0:G.data)?G.data.map(e=>({id:"research-".concat(e.id),title:e.title,slug:{pathname:"/medical/research/[slug]",params:{slug:e.slug}}})):[],i=Array.isArray(null==J?void 0:J.data)?J.data.map(e=>({id:"international-".concat(e.id),title:e.title,slug:{pathname:"/medical/international-collaboration/[slug]",params:{slug:e.slug}}})):[],l=t.map(e=>"news"===e.id?{...e,children:[]}:"research"===e.id?{...e,children:s}:"international-collaboration"===e.id?{...e,children:i}:e),n=a.map(e=>"news-events"===e.id?{...e,children:r}:e);return b.U7.some(e=>y===e||y.startsWith(e+"/")),"medical"===e?l:"umc"===e?n:h(null==B?void 0:B.data,null==$?void 0:$.data,null==Y?void 0:Y.data,null==K?void 0:K.data)},[h,t,a,y,D,Z,null==B?void 0:B.data,null==$?void 0:$.data,null==Y?void 0:Y.data,null==K?void 0:K.data,null==Q?void 0:Q.data,null==G?void 0:G.data,null==J?void 0:J.data,q]);i(L,()=>{k(null)});let et=e=>{e&&k(e)},ea=()=>{k(null)},er=(0,s.useMemo)(()=>e=>p(e).some(e=>g(X,e)),[X]),es=(0,s.useMemo)(()=>ee.find(e=>e.id===j),[j,ee]),ei=(0,s.useRef)(!1);return(0,s.useEffect)(()=>(H?(document.body.style.overflow="hidden",ei.current=!0):ei.current&&(document.body.style.overflow="",ei.current=!1),()=>{ei.current&&(document.body.style.overflow="")}),[H]),(0,r.jsxs)("header",{className:"".concat(U?"bg-gray-100":"bg-white"," transition-all shadow-md duration-150"),children:[(0,r.jsxs)("div",{className:"relative transition-colors duration-150 ".concat(U?"bg-gray-100":"bg-white"," z-50"),children:[(0,r.jsx)("div",{className:"container mx-auto flex h-[77px] items-center justify-between px-4 lg:px-10",children:(0,r.jsxs)("div",{className:"flex items-center xl:gap-[52px] gap-4 justify-between w-full",children:[(0,r.jsx)(u.N_,{href:"/",className:"relative block xl:h-[56px] h-[48px] xl:max-w-[242px] max-w-[216px] w-full",children:(0,r.jsx)(m.p,{src:"/images/logo.webp",alt:"Logo",width:242,height:56,objectFit:"contain",priority:!0})}),(0,r.jsx)("nav",{className:"hidden h-[77px] xl:flex",children:(0,r.jsx)("ul",{className:"flex h-full items-center xl:space-x-[26px] space-x-4",children:ee.map(e=>{let t=null==e?void 0:e.slug;return(0,r.jsx)("li",{className:"h-full group flex-shrink-0",onMouseEnter:()=>e.children&&et(e.id),onMouseLeave:ea,children:e.children&&e.children.length>0?"support"===e.id?(0,r.jsxs)("button",{className:"flex flex-shrink-0 title-2 ".concat(U?"text-gray-600":"text-primary-600"," h-full items-center gap-2 duration-150 ease-in-out underline-offset-4 cursor-pointer ").concat(er(e)?"underline":""),children:[(0,r.jsx)("span",{children:e.title}),(0,r.jsx)(c,{className:"h-2 w-2 duration-150 ease-in-out ".concat(er(e)?U?"text-gray-600":"text-primary-600":"text-gray-300 group-hover:-rotate-180")})]}):(0,r.jsxs)(u.N_,{href:t,className:"flex flex-shrink-0 title-2 ".concat(U?"text-gray-600":"text-primary-600"," h-full items-center gap-2 duration-150 ease-in-out underline-offset-4 ").concat(er(e)?"underline":""),children:[(0,r.jsx)("span",{children:e.title}),(0,r.jsx)(c,{className:"h-2 w-2 duration-150 ease-in-out ".concat(er(e)?U?"text-gray-600":"text-primary-600":"text-gray-300 group-hover:-rotate-180")})]}):(0,r.jsx)(u.N_,{href:t,className:"flex flex-shrink-0 title-2 ".concat(U?"text-gray-600":"text-primary-600"," h-full items-center gap-2 duration-150 ease-in-out underline-offset-4 ").concat(er(e)?"underline":""),children:(0,r.jsx)("span",{children:e.title})})},"menu-".concat(e.id))})})}),(0,r.jsxs)("div",{className:"flex xl:hidden items-center",children:[(0,r.jsx)(u.N_,{href:"/patient/search",className:"size-[42px] flex items-center justify-center",children:(0,r.jsx)(l.A,{className:"text-black"})}),(0,r.jsx)("div",{className:"relative mr-2.5",children:R?(0,r.jsx)(u.N_,{href:"/patient/account/user/user-info",className:"size-[42px] flex items-center justify-center cursor-pointer",children:(0,r.jsx)(n.A,{className:"text-black"})}):(0,r.jsx)("button",{type:"button",className:"size-[42px] flex items-center justify-center cursor-pointer",onClick:e=>{e.stopPropagation(),W()},children:(0,r.jsx)(n.A,{className:"text-black"})})}),(0,r.jsx)("button",{className:"py-[7px] px-px",onClick:()=>O(!H),children:H?(0,r.jsx)(o.A,{className:"h-6 w-6"}):(0,r.jsx)(d.A,{className:"h-6 w-6"})})]})]})}),(0,r.jsx)(S.N,{mode:"sync",children:j&&(0,r.jsx)(A.P.div,{ref:L,className:"w-full overflow-hidden absolute top-full left-0 right-0 z-10 bg-gray-100 shadow-sm",initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.4,ease:"easeInOut"},onMouseEnter:()=>et(j),onMouseLeave:ea,children:(0,r.jsx)(C,{currentMenuItem:es,activeLevel2Item:F,setActiveLevel2Item:I,searchInputRef:T,setOpenMegaMenu:k})})})]}),(0,r.jsx)(_,{menus:ee})]})}},46756:(e,t,a)=>{"use strict";a.d(t,{default:()=>c});var r=a(45704),s=a(66724),i=a(51265),l=a(58192),n=a(11878),o=a(64704),d=a(24293);function c(){let e=(0,o.n)(e=>e.isForgotPasswordOpen),t=(0,d.a8)(),a=null==t?void 0:t.endsWith("/patient/checkout"),c=(0,o.n)(e=>e.closeAll),m=(0,o.n)(e=>e.openLogin),u=(0,o.n)(e=>e.openResetPassword),h=(0,o.n)(e=>e.forgotPassword),p=(0,o.n)(e=>e.setError),x=(0,o.n)(e=>e.error),g=(0,o.n)(e=>e.isLoading),[f,b]=(0,s.useState)(""),[v,y]=(0,s.useState)(!1),[j,w]=(0,s.useState)(""),N=(0,s.useRef)(null);(0,s.useEffect)(()=>{let t=t=>{e&&N.current&&!N.current.contains(t.target)&&!a&&(c(),b(""),y(!1),w(""),p(null))};return e&&document.addEventListener("mousedown",t),()=>{document.removeEventListener("mousedown",t)}},[e,c,p,a]);let k=()=>{c(),b(""),y(!1),w(""),p(null)},_=e=>{e?/^(0|\+84)\d{9,10}$/.test(e)?w(""):w("Số điện thoại kh\xf4ng hợp lệ"):w("")},C=async()=>{if(w(""),p(null),!f){w("Vui l\xf2ng nhập số điện thoại");return}if(!v){p("Vui l\xf2ng x\xe1c nhận bạn kh\xf4ng phải l\xe0 robot");return}if(!j)try{await h(f),c(),u()}catch(r){var e,t,a;(null===(a=r.response)||void 0===a?void 0:null===(t=a.data)||void 0===t?void 0:null===(e=t.errors)||void 0===e?void 0:e.phone)&&w(r.response.data.errors.phone[0])}};return(0,r.jsx)(r.Fragment,{children:e&&(0,r.jsxs)("div",{className:"fixed inset-0 flex items-center justify-center z-[100]",children:[(0,r.jsx)("div",{className:"absolute bg-black opacity-70 inset-0 cursor-pointer",onClick:a?void 0:k}),(0,r.jsx)("div",{className:"relative z-10 max-h-[100svh] p-4 w-full overflow-y-auto",children:(0,r.jsx)("div",{className:"flex items-center justify-center",children:(0,r.jsxs)("div",{ref:N,className:"bg-white rounded-lg md:pt-12 md:pb-8 md:px-6 pt-12 pb-4 px-4 max-w-md w-full relative",children:[(0,r.jsxs)("button",{className:"absolute text-primary-600 xl:top-4 md:top-3 top-2 xl:left-4 md:left-3 left-2 text-gray-500 hover:text-gray-700 cursor-pointer flex items-center gap-1",onClick:()=>{c(),m()},children:[(0,r.jsx)(i.A,{className:"md:size-5 size-4"}),(0,r.jsx)("span",{className:"body-2",children:"Quay lại"})]}),!a&&(0,r.jsx)("button",{className:"absolute xl:top-4 md:top-3 top-2 xl:right-4 md:right-3 right-2 text-gray-500 hover:text-gray-700 cursor-pointer",onClick:k,children:(0,r.jsx)(l.A,{size:20})}),(0,r.jsx)("div",{className:"flex items-center justify-center mb-2",children:(0,r.jsx)(n.p,{src:"/images/logo.webp",alt:"UMC Care logo",width:242,height:45,priority:!0})}),(0,r.jsx)("p",{className:"text-center body-3 text-gray-600 xl:mb-6 md:mb-5 mb-4",children:"Vui l\xf2ng nhập số điện thoại để kh\xf4i phục mật khẩu"}),x&&(0,r.jsx)("div",{className:"bg-red-50 border border-red-200 rounded-md p-3 mb-4",children:(0,r.jsx)("p",{className:"text-red-600 body-3",children:x})}),(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{htmlFor:"phone",className:"block body-2 !font-medium text-gray-700 mb-1",children:"Số điện thoại"}),(0,r.jsx)("input",{id:"phone",type:"tel",value:f,onChange:e=>{let t=e.target.value.replace(/\D/g,"");b(t),_(t)},className:"w-full px-3 py-2 border ".concat(j?"border-red-500":"border-gray-300"," rounded-md focus:outline-none focus:ring-0 body-3"),placeholder:"Nhập số điện thoại"}),j&&(0,r.jsx)("p",{className:"text-red-500 body-4 mt-1",children:j})]}),(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)("input",{id:"isNotRobot",type:"checkbox",checked:v,onChange:e=>y(e.target.checked),className:"h-4 w-4 text-primary-500 focus:ring-primary-500 border-gray-300 rounded cursor-pointer"}),(0,r.jsx)("label",{htmlFor:"isNotRobot",className:"ml-2 body-2 text-gray-700",children:"T\xf4i kh\xf4ng phải l\xe0 robot"})]}),(0,r.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,r.jsx)("button",{className:"w-full btn btn-light label-2 max-md:!px-4 disabled:opacity-50 disabled:cursor-not-allowed",onClick:C,disabled:g,children:g?"Đang kiểm tra...":"Gửi m\xe3 OTP"}),(0,r.jsx)("button",{className:"w-full btn btn-outline-primary label-2 max-md:!px-4",onClick:()=>{c(),m()},children:"Đăng nhập"})]})]})]})})})]})})}},53808:(e,t,a)=>{"use strict";a.d(t,{default:()=>o});var r=a(45704),s=a(26927),i=a(66724),l=a(99018),n=a(75330);function o(){let e=(0,l.usePathname)(),t=(0,n.H)(e=>e.isOverlayVisible);return((0,i.useEffect)(()=>{let e="easy-ai-hide-style",a=document.getElementById(e);t?(a||((a=document.createElement("style")).id=e,a.innerHTML="\n #easychatgpt-widget, [id^='easyai'], [class*='easyai'], #easy-ai-widget-container, .easy-ai-widget, \n iframe[src*='geteasy.ai'], .easy-ai-chat-bubble, .easy-ai-chat-window,\n [class*='chat-widget'], [id*='chat-widget'], .chat-bubble {\n display: none !important;\n visibility: hidden !important;\n opacity: 0 !important;\n pointer-events: none !important;\n }\n ",document.head.appendChild(a)),window.EasyAI&&"function"==typeof window.EasyAI.hide&&window.EasyAI.hide()):(a&&a.remove(),window.EasyAI&&"function"==typeof window.EasyAI.show&&window.EasyAI.show())},[t]),(null==e?void 0:e.includes("/welcome"))||(null==e?void 0:e.includes("/chao-mung")))?null:(0,r.jsx)(s.default,{src:"https://widget.geteasy.ai/dist/widget/main.js",defer:!0,strategy:"afterInteractive",onLoad:()=>{window.EasyAI&&(window.EasyAI.init({workspaceUuid:"d734fb80-4d39-4fd3-8b8c-d6af95ad4489"}),n.H.getState().isOverlayVisible&&"function"==typeof window.EasyAI.hide&&window.EasyAI.hide())}})}},69928:(e,t,a)=>{"use strict";a.d(t,{default:()=>o});var r=a(45704),s=a(15515),i=a(51605),l=a(76479),n=a(66724);function o(e){let{children:t}=e,[a]=(0,n.useState)(()=>new s.E);return(0,r.jsxs)(i.Ht,{client:a,children:[t,(0,r.jsx)(l.E,{initialIsOpen:!1})]})}},72761:(e,t,a)=>{"use strict";a.d(t,{gf:()=>i});var r=a(95935),s=a(85942);a(7283);let i=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=arguments.length>2?arguments[2]:void 0;return(0,r.I)({queryKey:["api",e,t],queryFn:()=>s.Ay.fetchItems(e,t),...a})}},73071:(e,t,a)=>{"use strict";a.d(t,{A:()=>i});var r=a(45704),s=a(66724);function i(e){let{isOpen:t,onClose:a,children:i,wrapperClassName:l="",lockScroll:n=!0}=e,o=(0,s.useRef)(null),d=(0,s.useRef)(!1);return((0,s.useEffect)(()=>{if(t&&n){document.body.style.overflow="hidden";let e=window.innerWidth-document.body.clientWidth;document.body.style.paddingRight="".concat(e,"px"),d.current=!0}else d.current&&(document.body.style.overflow="",document.body.style.paddingRight="",d.current=!1);return()=>{d.current&&(document.body.style.overflow="",document.body.style.paddingRight="")}},[t,n]),(0,s.useEffect)(()=>{let e=e=>{t&&o.current&&!o.current.contains(e.target)&&a()};return t&&document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[t,a]),t)?(0,r.jsxs)("div",{className:"fixed inset-0 flex items-center justify-center z-[100]",children:[(0,r.jsx)("div",{className:"absolute inset-0 bg-black opacity-70 cursor-pointer",onClick:a}),(0,r.jsx)("div",{className:"relative z-10 max-h-[100svh] p-4 w-full overflow-y-auto cursor-pointer",children:(0,r.jsx)("div",{className:"flex items-center justify-center",children:(0,r.jsx)("div",{ref:o,className:"relative z-10 cursor-default ".concat(l),children:i})})})]}):null}},75330:(e,t,a)=>{"use strict";a.d(t,{H:()=>r});let r=(0,a(46101).v)(e=>({isOverlayVisible:!1,setOverlayVisible:t=>e({isOverlayVisible:t})}))},75681:(e,t,a)=>{"use strict";a.d(t,{default:()=>d});var r=a(45704),s=a(66724),i=a(58192),l=a(11878),n=a(64704),o=a(24293);function d(){let e=(0,n.n)(e=>e.isSuccessOpen),t=(0,o.a8)(),a=null==t?void 0:t.endsWith("/patient/checkout"),d=(0,n.n)(e=>e.isAuthenticated),c=a&&!d,m=(0,n.n)(e=>e.successType),u=(0,n.n)(e=>e.closeAll),h=(0,n.n)(e=>e.openLogin),p=(0,n.n)(e=>e.redirectPath),x=(0,o.rd)(),g=(0,s.useRef)(null),f=(0,s.useCallback)(()=>{"login"===m&&p&&(x.push(p),n.n.setState({redirectPath:null}))},[m,p,x]),b=(0,s.useCallback)(()=>{u(),f()},[u,f]);return(0,s.useEffect)(()=>{let t=t=>{e&&g.current&&!g.current.contains(t.target)&&!c&&b()};return e&&document.addEventListener("mousedown",t),()=>{document.removeEventListener("mousedown",t)}},[e,b,c]),(0,r.jsx)(r.Fragment,{children:e&&(0,r.jsxs)("div",{className:"fixed inset-0 flex items-center justify-center z-[100]",children:[(0,r.jsx)("div",{className:"absolute bg-black opacity-70 inset-0 cursor-pointer",onClick:c?void 0:b}),(0,r.jsx)("div",{className:"relative z-10 max-h-[100svh] p-4 w-full overflow-y-auto",children:(0,r.jsx)("div",{className:"flex items-center justify-center",children:(0,r.jsxs)("div",{ref:g,className:"bg-white rounded-lg md:pt-12 md:pb-8 md:px-6 pt-12 pb-4 px-4 max-w-md w-full relative",children:[!c&&(0,r.jsx)("button",{className:"absolute xl:top-4 md:top-3 top-2 xl:right-4 md:right-3 right-2 text-gray-500 hover:text-gray-700 cursor-pointer",onClick:b,children:(0,r.jsx)(i.A,{size:20})}),(0,r.jsx)("div",{className:"flex items-center justify-center mb-2",children:(0,r.jsx)(l.p,{src:"/images/logo.webp",alt:"UMC Care logo",width:242,height:45,priority:!0})}),(0,r.jsx)("p",{className:"text-center body-3 text-gray-600 xl:mb-6 md:mb-5 mb-4",children:(()=>{switch(m){case"login":return"Đăng nhập th\xe0nh c\xf4ng!";case"signup":return"Đăng k\xfd t\xe0i khoản th\xe0nh c\xf4ng!";case"forgot-password":return"Kh\xf4i phục mật khẩu th\xe0nh c\xf4ng!";default:return"Thao t\xe1c th\xe0nh c\xf4ng!"}})()}),(0,r.jsx)("div",{className:"space-y-4",children:(0,r.jsx)("button",{className:"w-full btn btn-light label-2 max-md:!px-4",onClick:()=>{"signup"===m||"forgot-password"===m?(u(),h()):(u(),f())},children:"login"===m?"Đ\xf3ng":"Đăng nhập"})})]})})})]})})}},78818:(e,t,a)=>{"use strict";a.d(t,{default:()=>S});var r=a(45704),s=a(99018),i=a(11878),l=a(24293),n=a(84405);let o=e=>{let{className:t="",...a}=e;return(0,r.jsx)("svg",{width:"10",height:"12",viewBox:"0 0 10 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.00001 0.549316C7.42582 0.549316 9.44727 2.57078 9.44727 4.99659C9.44727 5.7883 9.17512 6.5691 8.79481 7.27652C8.41301 7.9867 7.90759 8.64979 7.40547 9.21431C6.90239 9.77994 6.39406 10.2562 5.99802 10.5926C5.8002 10.7607 5.62705 10.8967 5.49355 10.993C5.42763 11.0406 5.36586 11.0824 5.31254 11.1144C5.2866 11.13 5.25498 11.1479 5.22135 11.1635C5.20461 11.1711 5.18053 11.1815 5.1518 11.1907C5.12921 11.1979 5.07272 11.2148 5.00001 11.2148C4.92665 11.2148 4.86972 11.1976 4.84705 11.1903C4.81817 11.1809 4.794 11.1705 4.77723 11.1627C4.74354 11.147 4.7119 11.1289 4.68596 11.1132C4.63266 11.0809 4.57092 11.0387 4.50504 10.9908C4.37163 10.8938 4.19855 10.7569 4.00084 10.5877C3.60499 10.2492 3.0969 9.77054 2.59406 9.20339C2.09222 8.63738 1.58706 7.97369 1.20538 7.26517C0.82533 6.5597 0.552734 5.7821 0.552734 4.99659C0.552734 2.57078 2.57419 0.549316 5.00001 0.549316ZM5.00001 6.32479C4.26646 6.32479 3.6718 5.73014 3.6718 4.99659C3.6718 4.26305 4.26646 3.66839 5.00001 3.66839C5.73355 3.66839 6.32821 4.26305 6.32821 4.99659C6.32821 5.73014 5.73355 6.32479 5.00001 6.32479Z",fill:"white"})})};var d=a(72761),c=a(7283),m=a(54173);let u=[],h=e=>{if(!e)return"";let t=e.replace(/\(84\.28\)/g,"+8428");return(t=t.replace(/[^\d+]/g,"")).startsWith("84")&&!t.startsWith("+84")&&(t="+"+t),t.startsWith("0")&&(t="+84"+t.substring(1)),t.startsWith("+")||(t="+"+t),"tel:".concat(t)};function p(){var e,t,a,s,p,x,g,f,b,v,y;let j=(0,m.c3)(),w=[{name:j("footer.address_1.title"),address:j("footer.address_1.address"),addressLink:"https://maps.google.com/?q=215+Hồng+B\xe0ng,+Phường+11,+Quận+5,+Th\xe0nh+phố+Hồ+Ch\xed+Minh",hotline:"(84.28) 3855 4269",fax:null,email:"bvdhyd@umc.edu.vn",website_link:"https://bvdaihoccoso2.com.vn/"},{name:j("footer.address_2.title"),address:j("footer.address_2.address"),addressLink:"https://maps.google.com/?q=201+Nguyễn+Ch\xed+Thanh,+Phường+12,+Quận+5,+Th\xe0nh+phố+Hồ+Ch\xed+Minh",hotline:"(84.28) 3955 5548",fax:null,email:"bvdaihoccoso2@umc.edu.vn",website_link:"https://bvdaihoccoso2.com.vn/"},{name:j("footer.address_3.title"),address:j("footer.address_3.address"),addressLink:"https://maps.google.com/?q=221B+Ho\xe0ng+Văn+Thụ,+Phường+8,+Quận+Ph\xfa+Nhuận,+Th\xe0nh+phố+Hồ+Ch\xed+Minh",hotline:"(84.28) 3842 0070",fax:null,email:"bvdaihoccoso3@umc.edu.vn",website_link:"https://bvdaihoccoso3.com.vn/"},{heading:j("footer.address_4.heading"),name:j("footer.address_4.title"),address:j("footer.address_4.address"),addressLink:"https://maps.google.com/?q=20-22+Dương+Quang+Trung,+Phường+12,+Quận+10,+Th\xe0nh+phố+Hồ+Ch\xed+Minh",hotline:"1900 6923",fax:null,email:"contact.us@umcclinic.com.vn",website_link:"https://umcclinic.com.vn/"}],N=(0,c.Ym)(),{data:k}=(0,d.gf)("policies",{fields:["title","slug","status","position","createdAt"],filters:{status:{_eq:"published"}},sort:[{column:"position",order:"desc"},{column:"createdAt",order:"desc"}],pagination:!1,limit:-1,locale:N}),_=[...Array.isArray(null==k?void 0:k.data)?(null==k?void 0:k.data).map(e=>({label:e.title,href:{pathname:"/policy/[slug]",params:{slug:e.slug}}})):[],...u];return(0,r.jsxs)("footer",{className:"bg-primary-75 overflow-hidden",children:[(0,r.jsxs)("div",{className:"container pt-[46px]",children:[(0,r.jsxs)("div",{className:"flex flex-col lg:flex-row lg:items-start flex-wrap xl:gap-[42px] lg:gap-6 gap-8 xl:mb-[50px] lg:mb-[35px] mb-[42px]",children:[(0,r.jsx)(l.N_,{href:"/",className:"xl:w-[372px] md:w-[320px] w-[280px] xl:h-[86px] lg:h-[74px] md:h-[76px] h-[64px] relative max-md:mx-auto block",children:(0,r.jsx)(i.p,{src:"/images/logo.webp",alt:"footer logo",width:372,height:86,className:"size-full",objectFit:"cover"})}),(0,r.jsx)("div",{className:"w-full h-px bg-primary-700 opacity-[6%] md:hidden"}),(0,r.jsx)("div",{className:"lg:flex hidden h-14 w-[146px]"}),(0,r.jsxs)("div",{className:"flex md:flex-row flex-col max-md:items-center md:justify-between items-center flex-1 xl:space-x-[42px] max-md:space-y-8",children:[(0,r.jsxs)("div",{className:"space-y-3 flex items-center md:flex-col max-md:flex-col xl:w-[266px]",children:[(0,r.jsx)("div",{className:"body-4 text-primary-900",children:j("footer.follow")}),(0,r.jsxs)("div",{className:"flex gap-3",children:[(0,r.jsx)("a",{href:"https://www.facebook.com/benhviendaihocyduoc/?locale=vi_VN","aria-label":"Facebook",target:"_blank",rel:"noopener noreferrer nofollow",className:"block relative hover:opacity-80 aspect-square size-[28px]",children:(0,r.jsx)(i.p,{src:"/images/footer/facebook.png",alt:"facebook",width:28,height:28,objectFit:"contain",className:"w-full h-full"})}),(0,r.jsx)("a",{href:"https://www.youtube.com/@benhviendaihocyduochcmc","aria-label":"YouTube",target:"_blank",rel:"noopener noreferrer nofollow",className:"block relative hover:opacity-80 aspect-square size-[28px]",children:(0,r.jsx)(i.p,{src:"/images/footer/youtube.png",alt:"youtube",width:28,height:28,objectFit:"contain",className:"w-full h-full"})}),(0,r.jsx)("a",{href:"https://zalo.me/bvdhyd","aria-label":"Zalo",target:"_blank",rel:"noopener noreferrer nofollow",className:"block relative hover:opacity-80 aspect-square size-[28px]",children:(0,r.jsx)(i.p,{src:"/images/footer/zalo.png",alt:"zalo",width:28,height:28,objectFit:"contain",className:"w-full h-full"})}),(0,r.jsx)("a",{href:"https://www.tiktok.com/@bvdaihocyduoc","aria-label":"TikTok",target:"_blank",rel:"noopener noreferrer nofollow",className:"block relative hover:opacity-80 aspect-square size-[28px]",children:(0,r.jsx)(i.p,{src:"/images/footer/tiktok.png",alt:"tiktok",width:28,height:28,objectFit:"contain",className:"w-full h-full"})})]})]}),(0,r.jsxs)("div",{className:"space-y-3 max-md:flex max-md:items-center max-md:flex-col",children:[(0,r.jsx)("div",{className:"block body-4 text-primary-900",children:j("footer.download")}),(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)("a",{href:"https://apps.apple.com/vn/app/umc-care/id1484775684?l=vi",rel:"noopener noreferrer nofollow",target:"_blank",className:"block w-[123px] h-[35px] rounded-md relative",children:(0,r.jsx)(i.p,{src:"/images/footer/app-store.png",alt:"App Store",width:123,height:35,objectFit:"contain",className:"w-full h-full"})}),(0,r.jsx)("a",{href:"https://play.google.com/store/apps/details?id=vn.com.umc.patient",rel:"noopener noreferrer nofollow",target:"_blank",className:"block w-[123px] h-[35px] rounded-md relative",children:(0,r.jsx)(i.p,{src:"/images/footer/google-play.png",alt:"Google Play",width:123,height:35,objectFit:"contain",className:"w-full h-full"})})]})]})]})]}),(0,r.jsx)("div",{className:"w-full h-px bg-primary-900 opacity-[6%] xl:mb-[50px] md:mb-[35px] mb-[42px]"}),(0,r.jsxs)("div",{className:"relative lg:pt-8 relative",children:[(0,r.jsxs)("div",{className:"relative bg-primary-100 md:py-[36px] max-md:pb-[217px] max-md:pt-8 xl:px-11 md:px-[36px] px-[22px] max-md:flex max-md:flex-col-reverse rounded-t-2xl",children:[(0,r.jsxs)("div",{className:"inline-flex flex-col",children:[(0,r.jsx)("div",{className:"font-bold title-1 text-black xl:mb-4 md:mb-3 mb-2",children:null===(e=w[0])||void 0===e?void 0:e.name}),(0,r.jsx)("a",{href:null===(t=w[0])||void 0===t?void 0:t.addressLink,target:"_blank",rel:"noopener noreferrer nofollow",className:"body-3 text-black mb-3 max-md:whitespace-pre-line inline-block hover:text-primary-600 transition-colors",children:null===(a=w[0])||void 0===a?void 0:a.address}),(0,r.jsxs)("div",{className:"body-3 text-black mb-3",children:[(0,r.jsx)("span",{className:"font-bold",children:"Hotline:"})," ",(0,r.jsx)("a",{href:h((null===(s=w[0])||void 0===s?void 0:s.hotline)||""),className:"hover:text-primary-600 transition-colors",children:null===(p=w[0])||void 0===p?void 0:p.hotline})]}),(null===(x=w[0])||void 0===x?void 0:x.fax)&&(0,r.jsxs)("div",{className:"body-3 text-black mb-3",children:[(0,r.jsx)("span",{className:"font-bold",children:"Fax:"})," ",null===(g=w[0])||void 0===g?void 0:g.fax]}),(0,r.jsxs)("div",{className:"body-3 text-black mb-3",children:[(0,r.jsx)("span",{className:"font-bold",children:"Email:"})," ",(0,r.jsx)("a",{href:"mailto:".concat(null===(f=w[0])||void 0===f?void 0:f.email),className:"hover:text-primary-600 transition-colors",children:null===(b=w[0])||void 0===b?void 0:b.email})]}),(0,r.jsxs)("div",{className:"flex gap-3",children:[(0,r.jsx)("a",{href:null===(v=w[0])||void 0===v?void 0:v.website_link,target:"_blank",rel:"noopener noreferrer nofollow",className:"size-[26px] bg-primary-700 lg:hover:bg-primary-800 lg:duration-150 rounded-full flex items-center justify-center","aria-label":"website link",children:(0,r.jsx)(n.A,{className:"size-3 text-white"})}),(0,r.jsx)("a",{href:null===(y=w[0])||void 0===y?void 0:y.addressLink,target:"_blank",rel:"noopener noreferrer nofollow",className:"size-[26px] bg-primary-700 lg:hover:bg-primary-800 lg:duration-150 rounded-full flex items-center justify-center","aria-label":"address link",children:(0,r.jsx)(o,{className:"size-3 text-white"})})]})]}),(0,r.jsxs)("div",{className:"absolute md:right-0 max-md:inset-x-0 xl:bottom-[-54px] lg:bottom-[-48px] bottom-[-28px] xl:h-[423px] lg:h-[394px] h-[240px] w-full xl:max-w-[753px] lg:max-w-[700px] max-w-[400px] block z-0",children:[(0,r.jsx)(i.p,{src:"/images/footer/footer-building.webp",alt:"footer building",width:753,height:423,objectFit:"contain",className:"object-right-bottom max-md:hidden w-full h-full"}),(0,r.jsx)(i.p,{src:"/images/footer/footer-building.webp",alt:"footer building",width:400,height:240,objectFit:"contain",className:"object-right-bottom md:hidden w-full h-full"})]})]}),(0,r.jsx)("div",{className:"flex-1 grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 md:gap-[36px] gap-8 z-10 bg-white/50 xl:p-11 md:p-[36px] max-md:px-[22px] max-md:py-8 rounded-b-2xl xl:mb-12 mb-8",children:w.slice(1).map((e,t,a)=>(0,r.jsxs)("div",{className:"md:pr-[36px] flex flex-col justify-between relative ".concat(t{let a=e.href;return(0,r.jsxs)("div",{className:"flex items-center max-md:pb-4 max-md:border-b max-md:border-white last:max-md:border-0 last:max-md:pb-0",children:[e.href?(0,r.jsx)(l.N_,{href:a,className:"text-white hover:text-primary-50",children:e.label}):(0,r.jsx)("span",{className:"text-white mx-2",children:e.label}),t<_.length-1&&(0,r.jsx)("span",{className:"text-white mx-[21px] max-md:hidden",children:"|"})]},t)})}),(0,r.jsx)("div",{className:"body-4 md:text-white text-black max-md:mb-4 max-md:whitespace-pre-line",children:j("footer.copyright")}),(0,r.jsx)("div",{className:"flex justify-center md:hidden",children:(0,r.jsx)(i.p,{src:"/images/footer/logo-bct.png",alt:"Bộ C\xf4ng Thương",width:146,height:56,className:"h-14 w-auto"})})]})]})}var x=a(69920),g=a(93559),f=a(63959),b=a(66724);let v=e=>{let{className:t="",...a}=e;return(0,r.jsx)("svg",{width:"17",height:"18",viewBox:"0 0 17 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,...a,children:(0,r.jsx)("path",{d:"M16.1732 6.54514C17.0854 4.81912 16.6963 2.79393 15.2684 1.54179L14.6564 1.00516C14.1125 0.528148 13.2191 0.586729 12.7421 1.13068L10.4763 3.71447C9.99934 4.25843 10.0579 5.15177 10.6019 5.62878C11.1458 6.10579 11.2044 6.99913 10.7274 7.54309L7.14984 11.6228C6.67284 12.1667 5.77949 12.2253 5.23554 11.7483C4.69158 11.2713 3.79824 11.3299 3.32123 11.8738L1.11507 14.3896C0.638063 14.9336 0.696643 15.8269 1.2406 16.3039L1.85255 16.8406C3.28043 18.0927 5.39872 18.146 6.93122 17.0843C10.1667 14.6292 14.17 10.2011 16.1732 6.54514Z",fill:"white"})})};function y(){let[e,t]=(0,b.useState)(!1);return(0,b.useEffect)(()=>{let e=()=>t(window.scrollY>200);return window.addEventListener("scroll",e),()=>window.removeEventListener("scroll",e)},[]),(0,r.jsx)("div",{className:"fixed bottom-6 right-6 z-[49] flex flex-col gap-3 items-end",children:(0,r.jsxs)(x.N,{children:[(0,r.jsx)(g.P.a,{layout:!0,initial:{opacity:0,scale:.5,y:20},animate:{opacity:1,scale:1,y:0},href:"tel:19002827","aria-label":"Gọi điện thoại",className:"flex h-10 w-10 items-center justify-center rounded-full bg-primary-700 shadow-lg transition-colors hover:bg-primary-800",children:(0,r.jsx)(v,{})}),e&&(0,r.jsx)(g.P.button,{layout:!0,initial:{opacity:0,scale:.5,y:20},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.5,y:20},whileHover:{scale:1.1},whileTap:{scale:.9},"aria-label":"Back to top",onClick:()=>{window.scrollTo({top:0,behavior:"smooth"})},className:"flex h-10 w-10 cursor-pointer items-center justify-center rounded-full bg-white shadow-lg transition-colors hover:bg-gray-100",children:(0,r.jsx)(f.A,{size:22,className:"text-black"})})]})})}function j(e){let{schemas:t}=e;return(0,r.jsx)(r.Fragment,{children:t.map((e,t)=>(0,r.jsx)("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(e)}},"schema-".concat(t)))})}var w=a(20603),N=a(5507);let k=(0,b.createContext)(void 0),_=e=>{let{children:t,initialParams:a={}}=e,[s,i]=(0,b.useState)(a);return(0,r.jsx)(k.Provider,{value:{i18nParams:s,setI18nParams:e=>{i(e)}},children:t})};function C(e){let{children:t}=e,a=(0,c.Ym)(),s=function(e){var t,a,r,s,i,l,n;let o=w.C.organization,d={"@context":"https://schema.org/","@type":"WebSite",name:w.C.title[e],url:w.C.url,potentialAction:{"@type":"SearchAction",target:"".concat(w.C.url,"/").concat("en"===e?"en/search":"tim-kiem","?q={search_term_string}"),"query-input":"required name=search_term_string"}};return[d,{"@context":"https://schema.org","@type":"Organization","@id":"".concat(w.C.url,"/#organization"),name:o.name||w.C.title[e],alternateName:"UMC",url:w.C.url,logo:{"@type":"ImageObject",url:"".concat(w.C.url).concat(o.logo||"/logo.png")},sameAs:o.sameAs||[],contactPoint:[{"@type":"ContactPoint",telephone:(null===(t=o.contactPoint)||void 0===t?void 0:t.telephone)||"+842838555555",contactType:"customer service",areaServed:"VN",availableLanguage:["Vietnamese","English"]}]},{"@context":"https://schema.org","@type":"Hospital","@id":"".concat(w.C.url,"/#hospital"),name:o.name||w.C.title[e],url:w.C.url,logo:"".concat(w.C.url).concat(o.logo||"/logo.png"),image:"".concat(w.C.url,"/cover.jpg"),email:"bvdhyd@umc.edu.vn",telephone:"(84.28) 3855 4269",address:{"@type":"PostalAddress",streetAddress:(null===(a=o.address)||void 0===a?void 0:a.streetAddress)||"215 Hồng B\xe0ng, Phường 11, Quận 5",addressLocality:(null===(r=o.address)||void 0===r?void 0:r.addressLocality)||"Hồ Ch\xed Minh",addressRegion:(null===(s=o.address)||void 0===s?void 0:s.addressRegion)||"Hồ Ch\xed Minh",postalCode:(null===(i=o.address)||void 0===i?void 0:i.postalCode)||"700000",addressCountry:"VN"},geo:{"@type":"GeoCoordinates",latitude:(null===(l=o.geo)||void 0===l?void 0:l.latitude)||10.7553,longitude:(null===(n=o.geo)||void 0===n?void 0:n.longitude)||106.6601},hasMap:"https://maps.app.goo.gl/EMy5LFGzG1h73oaQ6",department:[{"@type":"Hospital",name:"Cơ sở 1",url:"https://bvdaihoc.com.vn/"},{"@type":"Hospital",name:"Cơ sở 2",url:"https://bvdaihoccoso2.com.vn/"},{"@type":"Hospital",name:"Cơ sở 3",url:"https://bvdaihoccoso3.com.vn/"},{"@type":"Clinic",name:"Ph\xf2ng kh\xe1m Bệnh viện Đại học Y Dược",url:"https://umcclinic.com.vn/"}]}]}(a);return(0,b.useEffect)(()=>{(0,N.B9)(a)},[a]),(0,b.useEffect)(()=>{"scrollRestoration"in window.history&&(window.history.scrollRestoration="manual")},[]),(0,b.useEffect)(()=>{window.location.hash||window.scrollTo(0,0)},[]),(0,r.jsx)(_,{children:(0,r.jsxs)("main",{className:"",children:[t,(0,r.jsx)(j,{schemas:s})]})})}function S(e){let{children:t}=e,a=(0,s.usePathname)();return a.includes("/welcome")||a.includes("/chao-mung")?(0,r.jsx)(r.Fragment,{children:t}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(C,{children:t}),(0,r.jsx)(p,{}),(0,r.jsx)(y,{})]})}},79778:(e,t,a)=>{"use strict";a.d(t,{default:()=>n});var r=a(66724),s=a(64704),i=a(5552),l=a(24293);function n(){let e=(0,s.n)(e=>e.closeAll),t=(0,s.n)(e=>e.isAuthenticated),{setIsContactSupportOpen:a}=(0,i.d)(),n=(0,l.a8)(),o=(0,l.rd)(),d=null==n?void 0:n.endsWith("/patient/checkout");return(0,r.useEffect)(()=>{let r=r=>{if("Escape"===r.key){if(d&&!t){o.push("/"),e();return}e(),a(!1)}};return window.addEventListener("keydown",r),()=>{window.removeEventListener("keydown",r)}},[e,a,d,t,o]),null}},80578:(e,t,a)=>{"use strict";a.d(t,{Ij:()=>i,U7:()=>r,c$:()=>l,wY:()=>s});let r=["/about/overview","/about/history","/about/core-values","/about/departments","/about/leader","/about/facilities","/about/awards","/detail-department","/detail-award"],s=["/","/patient","/policy","/sitemap"],i=["/medical"],l=["/umcers"]},95547:(e,t,a)=>{"use strict";a.d(t,{default:()=>u});var r=a(45704),s=a(66724),i=a(58192),l=a(31133),n=a(57969),o=a(11878),d=a(64704),c=a(54173),m=a(24293);function u(){let e=(0,d.n)(e=>e.isLoginOpen),t=(0,m.a8)(),a=null==t?void 0:t.endsWith("/patient/checkout"),u=(0,d.n)(e=>e.closeAll);(0,d.n)(e=>e.openForgotPassword),(0,d.n)(e=>e.openSignup);let h=(0,d.n)(e=>e.login),p=(0,d.n)(e=>e.setError),x=(0,d.n)(e=>e.error),[g,f]=(0,s.useState)(!1),[b,v]=(0,s.useState)(""),[y,j]=(0,s.useState)(""),[w,N]=(0,s.useState)(""),[k,_]=(0,s.useState)(""),[C,S]=(0,s.useState)(!1),A=(0,s.useRef)(null),z=(0,c.c3)(),P=(0,m.rd)(),E=(0,s.useCallback)(()=>{u()},[u]);(0,s.useEffect)(()=>{e||(v(""),j(""),N(""),_(""),p(null))},[e,p]),(0,s.useEffect)(()=>{let t=t=>{e&&A.current&&!A.current.contains(t.target)&&!a&&E()};return e&&document.addEventListener("mousedown",t),()=>{document.removeEventListener("mousedown",t)}},[e,E,a]);let M=e=>{e?/^(0|\+84)\d{9,10}$/.test(e)?N(""):N(z("authen_popup.login.error.phone")):N("")},L=async()=>{if(p(null),_(""),!b){N(z("authen_popup.login.error.phone"));return}if(!y){_(z("authen_popup.login.error.password"));return}if(!w){S(!0);try{await h(b,y);let e=d.n.getState();e.isAuthenticated&&e.redirectPath&&(P.push(e.redirectPath),d.n.setState({redirectPath:null}))}catch(a){var e,t;(null===(t=a.response)||void 0===t?void 0:null===(e=t.data)||void 0===e?void 0:e.errors)&&(a.response.data.errors.phone&&N(a.response.data.errors.phone[0]),a.response.data.errors.password&&_(a.response.data.errors.password[0]))}finally{S(!1)}}};return(0,r.jsx)(r.Fragment,{children:e&&(0,r.jsxs)("div",{className:"fixed inset-0 flex items-center justify-center z-[100]",children:[(0,r.jsx)("div",{className:"absolute bg-black opacity-70 inset-0 cursor-pointer",onClick:a?void 0:E}),(0,r.jsx)("div",{className:"relative z-10 max-h-[100svh] p-4 w-full overflow-y-auto",children:(0,r.jsx)("div",{className:"flex items-center justify-center",children:(0,r.jsxs)("div",{ref:A,className:"bg-white rounded-lg md:pt-8 md:pb-8 md:px-6 pt-12 pb-4 px-4 max-w-md w-full relative",children:[!a&&(0,r.jsx)("button",{className:"absolute xl:top-4 md:top-3 top-2 xl:right-4 md:right-3 right-2 text-gray-500 hover:text-gray-700 cursor-pointer",onClick:E,children:(0,r.jsx)(i.A,{size:20})}),(0,r.jsx)("div",{className:"flex items-center justify-center mb-2",children:(0,r.jsx)(o.p,{src:"/images/logo.webp",alt:"UMC Care logo",width:242,height:45,priority:!0})}),(0,r.jsx)("p",{className:"text-center body-3 text-gray-600 mb-0.5",children:z("authen_popup.login.description")}),(0,r.jsxs)("p",{className:"text-center body-3 text-gray-600 xl:mb-6 md:mb-5 mb-4",children:[z("authen_popup.login.sub_description")," ","",(0,r.jsx)("a",{href:"https://bvdaihoc.com.vn/ung-dung-umc-care",rel:"noopener noreferrer nofollow",target:"_blank",className:"text-primary-600 lg:hover:text-primary-400 lg:duration-150 font-bold",children:z("authen_popup.login.app_name")}),"."]}),(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{htmlFor:"phone",className:"block body-2 !font-medium text-gray-700 mb-1",children:z("authen_popup.login.phone.label")}),(0,r.jsx)("input",{id:"phone",type:"tel",value:b,onChange:e=>{let t=e.target.value.replace(/\D/g,"");v(t),M(t)},className:"w-full px-3 py-2 border ".concat(w?"border-red-500":"border-gray-300"," rounded-md focus:outline-none focus:ring-0 body-3"),placeholder:z("authen_popup.login.phone.placeholder")}),w&&(0,r.jsx)("p",{className:"text-red-500 body-4 mt-1",children:w})]}),(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)("label",{htmlFor:"password",className:"block body-2 !font-medium text-gray-700 mb-1",children:z("authen_popup.login.password.label")}),(0,r.jsx)("input",{id:"password",type:g?"text":"password",value:y,onChange:e=>{j(e.target.value),_("")},className:"w-full px-3 py-2 border ".concat(k?"border-red-500":"border-gray-300"," rounded-md focus:outline-none focus:ring-0 body-3"),placeholder:z("authen_popup.login.password.placeholder")}),(0,r.jsx)("button",{type:"button",className:"absolute right-3 top-9 text-gray-500",onClick:()=>{f(!g)},children:g?(0,r.jsx)(l.A,{size:20}):(0,r.jsx)(n.A,{size:20})}),k&&(0,r.jsx)("p",{className:"text-red-500 body-4 mt-1",children:k})]}),x&&(0,r.jsx)("div",{className:"bg-red-50 border border-red-200 rounded-md p-3",children:(0,r.jsx)("p",{className:"text-red-600 body-3",children:x})}),(0,r.jsx)("button",{className:"w-full btn btn-light label-2 max-md:!px-4 disabled:opacity-50 disabled:cursor-not-allowed",onClick:L,disabled:C,children:C?z("authen_popup.login.loading"):z("authen_popup.login.button")})]})]})})})]})})}},95586:()=>{},98227:(e,t,a)=>{Promise.resolve().then(a.bind(a,15097)),Promise.resolve().then(a.bind(a,18267)),Promise.resolve().then(a.t.bind(a,29126,23)),Promise.resolve().then(a.t.bind(a,49780,23)),Promise.resolve().then(a.bind(a,28172)),Promise.resolve().then(a.bind(a,5552)),Promise.resolve().then(a.bind(a,25099)),Promise.resolve().then(a.bind(a,53808)),Promise.resolve().then(a.bind(a,79778)),Promise.resolve().then(a.bind(a,37882)),Promise.resolve().then(a.bind(a,27411)),Promise.resolve().then(a.bind(a,15643)),Promise.resolve().then(a.bind(a,17273)),Promise.resolve().then(a.bind(a,78818)),Promise.resolve().then(a.bind(a,46756)),Promise.resolve().then(a.bind(a,95547)),Promise.resolve().then(a.bind(a,29051)),Promise.resolve().then(a.bind(a,14475)),Promise.resolve().then(a.bind(a,14934)),Promise.resolve().then(a.bind(a,75681)),Promise.resolve().then(a.bind(a,27983)),Promise.resolve().then(a.bind(a,69928)),Promise.resolve().then(a.t.bind(a,95586,23))}},e=>{var t=t=>e(e.s=t);e.O(0,[1953,2263,6696,9126,6257,713,6750,9055,7953,5014,4293,3561,143,1032,4619,7358],()=>t(98227)),_N_E=e.O()}]);